Replace F extension with string interpolation

This commit is contained in:
teinarss
2021-04-24 17:46:24 +02:00
committed by reaperrr
parent 1385aca783
commit 10676be377
300 changed files with 752 additions and 799 deletions

View File

@@ -54,10 +54,10 @@ namespace OpenRA.Mods.Common.Lint
if (t.Key.StartsWith("-", StringComparison.Ordinal))
{
if (t.Value.Nodes.Any())
emitError("{0} {1} defines child nodes, which are not valid for removals.".F(t.Location, t.Key));
emitError($"{t.Location} {t.Key} defines child nodes, which are not valid for removals.");
if (!string.IsNullOrEmpty(t.Value.Value))
emitError("{0} {1} defines a value, which is not valid for removals.".F(t.Location, t.Key));
emitError($"{t.Location} {t.Key} defines a value, which is not valid for removals.");
continue;
}
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Common.Lint
// Inherits can never define children
if (traitName == "Inherits" && t.Value.Nodes.Any())
{
emitError("{0} defines child nodes, which are not valid for Inherits.".F(t.Location));
emitError($"{t.Location} defines child nodes, which are not valid for Inherits.");
continue;
}
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Lint
{
var fieldName = NormalizeName(field.Key);
if (traitInfo.GetField(fieldName) == null)
emitError("{0} refers to a trait field `{1}` that does not exist on `{2}`.".F(field.Location, fieldName, traitName));
emitError($"{field.Location} refers to a trait field `{fieldName}` that does not exist on `{traitName}`.");
}
}
}