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

Fix concurrent collections CA1836 rule violations #40629

Merged
merged 2 commits into from
Aug 11, 2020

Conversation

jozkee
Copy link
Member

@jozkee jozkee commented Aug 10, 2020

Follow-up to dotnet/roslyn-analyzers#3978

Fix places where the rule detects an inefficient usage of Count == 0 or similar condition after changing the rule to only diagnose allowed types (concurrent types for now).

Also updates rule severity to Warning in CodeAnalysis.ruleset file.

cc @mavasani @jeffhandley

@jozkee jozkee added this to the 5.0.0 milestone Aug 10, 2020
@jozkee jozkee requested review from stephentoub and a team August 10, 2020 20:42
@jozkee jozkee self-assigned this Aug 10, 2020
@ghost
Copy link

ghost commented Aug 10, 2020

Tagging subscribers to this area: @eiriktsarpalis
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@jozkee
Copy link
Member Author

jozkee commented Aug 10, 2020

Seems like CI issues are due to dotnet/runtime hasn't ingested the latest bits from dotnet/roslyn-analyzers, maybe we should holf-off changing severity until then.

@mavasani
Copy link

Seems like CI issues are due to dotnet/runtime hasn't ingested the latest bits from dotnet/roslyn-analyzers, maybe we should holf-off changing severity until then.

I think you can just bump up the below to 3.3.0-beta3.20410.1 to pick up the latest version from https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet5&package=Microsoft.CodeAnalysis.NetAnalyzers&protocolType=NuGet&version=3.3.0-beta3.20410.1&view=versions in this PR itself:

<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="3.3.0-beta3.20407.4" PrivateAssets="all" />

@ghost
Copy link

ghost commented Aug 10, 2020

Hello @danmosemsft!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@jkotas
Copy link
Member

jkotas commented Aug 11, 2020

"The operation is not allowed on non-connected sockets.". #38159 ?

@jkotas jkotas merged commit bcf3bd3 into dotnet:master Aug 11, 2020
@jozkee jozkee deleted the fix_ca1836_3 branch August 11, 2020 01:29
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants