Closed ig-sinicyn closed 3 years ago
The simplest way is to add analyzers
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
and suppress everything we don't need in editorconfig
dotnet_diagnostic.csXXXX.severity=none
With .NET 5 btw you don’t even need the NuGet :)
I am not sure what exactly the library should do. In most cases you do want the current culture.
Scan for CA1307: Specify StringComparison for clarity CA1309: Use ordinal StringComparison and fix tests
more detail on https://docs.microsoft.com/en-us/dotnet/standard/base-types/string-comparison-net-5-plus