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

Use Microsoft.CodeAnalysis.FxCopAnalyzers #18870

Open
roji opened this issue Nov 12, 2019 · 1 comment
Open

Use Microsoft.CodeAnalysis.FxCopAnalyzers #18870

roji opened this issue Nov 12, 2019 · 1 comment

Comments

@roji
Copy link
Member

roji commented Nov 12, 2019

We recently had a bug (#18831) because of a StartsWith lacking StringComparison.Ordinal. There are official FxCop analyzers for this kind of thing, we should start using them.

@ajcvickers
Copy link
Member

Note from triage: Selectively enable useful FxCop rules that won't require many (>~10) suppressions in code.

@ajcvickers ajcvickers added this to the 5.0.0 milestone Nov 15, 2019
@ajcvickers ajcvickers modified the milestones: 5.0.0, Backlog Mar 12, 2020
roji added a commit that referenced this issue Sep 22, 2020
The following rules led to code changes:

- CA2000: Dispose objects before losing scope
- CA2012: Use ValueTasks correctly
- CA2008: Do not create tasks without passing a TaskScheduler
- CA2016: Forward the 'CancellationToken' parameter to methods that take one
- CA1310: Specify StringComparison for correctness
- CA1309: Use ordinal stringcomparison
- CA1304: Specify CultureInfo

Part of #18870
ghost pushed a commit that referenced this issue Sep 22, 2020
The following rules led to code changes:

- CA2000: Dispose objects before losing scope
- CA2012: Use ValueTasks correctly
- CA2008: Do not create tasks without passing a TaskScheduler
- CA2016: Forward the 'CancellationToken' parameter to methods that take one
- CA1310: Specify StringComparison for correctness
- CA1309: Use ordinal stringcomparison
- CA1304: Specify CultureInfo

Part of #18870
@AndriySvyryd AndriySvyryd modified the milestones: Backlog, MQ Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants