Enable Code Quality Rules

Enforces a variety of CAxxxx rules that do not have existing violations.

For the benefit of dotnet_code_quality.CA2241.try_determine_additional_string_formatting_methods_automatically = true, rename parameters of methods that forward to string.Format so format issues will get detected automatically.
This commit is contained in:
RoosterDragon
2023-03-12 10:42:30 +00:00
committed by abcdefg30
parent d838d08570
commit 595717fff0
5 changed files with 208 additions and 12 deletions

View File

@@ -27,9 +27,9 @@ namespace OpenRA
return string.Compare(str.ToUpperInvariant(), str, false) == 0;
}
public static string F(this string fmt, params object[] args)
public static string F(this string format, params object[] args)
{
return string.Format(fmt, args);
return string.Format(format, args);
}
public static T WithDefault<T>(T def, Func<T> f)