Fix CA1310, CA1311
This commit is contained in:
committed by
Matthias Mailänder
parent
d83e579dfe
commit
285443f10f
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Lint
|
||||
static string NormalizeName(string key)
|
||||
{
|
||||
var name = key.Split('@')[0];
|
||||
if (name.StartsWith("-", StringComparison.Ordinal))
|
||||
if (name.StartsWith('-'))
|
||||
return name[1..];
|
||||
|
||||
return name;
|
||||
@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Lint
|
||||
foreach (var t in actor.Value.Nodes)
|
||||
{
|
||||
// Removals can never define children or values.
|
||||
if (t.Key.StartsWith("-", StringComparison.Ordinal))
|
||||
if (t.Key.StartsWith('-'))
|
||||
{
|
||||
if (t.Value.Nodes.Length > 0)
|
||||
emitError($"{t.Location} `{t.Key}` defines child nodes, which are not valid for removals.");
|
||||
|
||||
Reference in New Issue
Block a user