Fix CA1310, CA1311

This commit is contained in:
RoosterDragon
2023-03-12 15:44:49 +00:00
committed by Matthias Mailänder
parent d83e579dfe
commit 285443f10f
43 changed files with 80 additions and 67 deletions

View File

@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Common.Lint
if (sequenceReference.Prefix)
{
// TODO: Remove prefixed sequence references and instead use explicit lists of lintable references.
if (!sequences.Sequences(i).Any(s => s.StartsWith(sequence)))
if (!sequences.Sequences(i).Any(s => s.StartsWith(sequence, StringComparison.Ordinal)))
emitWarning($"Actor type `{actorInfo.Value.Name}` trait `{traitName}` field `{field.Name}` defines a prefix `{sequence}` that does not match any sequences on image `{i}`.");
}
else if (!sequences.HasSequence(i, sequence))
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Lint
if (sequenceReference.Prefix)
{
// TODO: Remove prefixed sequence references and instead use explicit lists of lintable references.
if (!sequences.Sequences(image).Any(s => s.StartsWith(sequence)))
if (!sequences.Sequences(image).Any(s => s.StartsWith(sequence, StringComparison.Ordinal)))
emitWarning($"Weapon type `{weaponInfo.Key}` projectile field `{field.Name}` defines a prefix `{sequence}` that does not match any sequences on image `{image}`.");
}
else if (!sequences.HasSequence(image, sequence))