Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Net 5.0] Behavior changes in string comparison #125

Closed
ig-sinicyn opened this issue Nov 14, 2020 · 3 comments · Fixed by #133
Closed

[Net 5.0] Behavior changes in string comparison #125

ig-sinicyn opened this issue Nov 14, 2020 · 3 comments · Fixed by #133
Assignees

Comments

@ig-sinicyn
Copy link
Contributor

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

@ig-sinicyn ig-sinicyn self-assigned this Nov 14, 2020
@NN---
Copy link
Member

NN--- commented Nov 15, 2020

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

@NN---
Copy link
Member

NN--- commented Dec 17, 2020

With .NET 5 btw you don’t even need the NuGet :)

@NN---
Copy link
Member

NN--- commented Jan 20, 2021

I am not sure what exactly the library should do. In most cases you do want the current culture.

@NN--- NN--- linked a pull request Jan 20, 2021 that will close this issue
NN--- added a commit that referenced this issue Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants