Fix CA1851, assume_method_enumerates_parameters = true

This commit is contained in:
RoosterDragon
2023-07-14 20:30:08 +01:00
committed by abcdefg30
parent 3275875ae5
commit 93a97d5d6f
37 changed files with 108 additions and 96 deletions

View File

@@ -66,12 +66,12 @@ namespace OpenRA.Mods.Common.Lint
granted.Add(g);
}
var unconsumed = granted.Except(consumed);
if (unconsumed.Any())
var unconsumed = granted.Except(consumed).ToList();
if (unconsumed.Count != 0)
emitWarning($"Actor type `{actorInfo.Key}` grants conditions that are not consumed: {unconsumed.JoinWith(", ")}.");
var ungranted = consumed.Except(granted);
if (ungranted.Any())
var ungranted = consumed.Except(granted).ToList();
if (ungranted.Count != 0)
emitError($"Actor type `{actorInfo.Key}` consumes conditions that are not granted: {ungranted.JoinWith(", ")}.");
}
}