Fix crlfs in CheckUnknown*Fields lint tests.
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.Mods.Common.Traits;
|
using OpenRA.Mods.Common.Traits;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
@@ -41,13 +41,13 @@ namespace OpenRA.Mods.Common.Lint
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var traitName = NormalizeName(t.Key);
|
var traitName = NormalizeName(t.Key);
|
||||||
var traitInfo = modData.ObjectCreator.FindType(traitName + "Info");
|
var traitInfo = modData.ObjectCreator.FindType(traitName + "Info");
|
||||||
foreach (var field in t.Value.Nodes)
|
foreach (var field in t.Value.Nodes)
|
||||||
{
|
{
|
||||||
var fieldName = NormalizeName(field.Key);
|
var fieldName = NormalizeName(field.Key);
|
||||||
if (traitInfo.GetField(fieldName) == null)
|
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("{0} refers to a trait field `{1}` that does not exist on `{2}`.".F(field.Location, fieldName, traitName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.GameRules;
|
using OpenRA.GameRules;
|
||||||
|
|
||||||
@@ -33,8 +33,8 @@ namespace OpenRA.Mods.Common.Lint
|
|||||||
foreach (var weapon in weapons)
|
foreach (var weapon in weapons)
|
||||||
{
|
{
|
||||||
foreach (var field in weapon.Value.Nodes)
|
foreach (var field in weapon.Value.Nodes)
|
||||||
{
|
{
|
||||||
// Removals can never define children
|
// Removals can never define children
|
||||||
if (field.Key.StartsWith("-", StringComparison.Ordinal) && field.Value.Nodes.Any())
|
if (field.Key.StartsWith("-", StringComparison.Ordinal) && field.Value.Nodes.Any())
|
||||||
{
|
{
|
||||||
emitError("{0} has child nodes, which is not valid for removals.".F(field.Key));
|
emitError("{0} has child nodes, which is not valid for removals.".F(field.Key));
|
||||||
|
|||||||
Reference in New Issue
Block a user