Skip to content

Fix concurrent collections CA1836 rule violations - #40629

Merged
jkotas merged 2 commits into
dotnet:masterfrom
jozkee:fix_ca1836_3
Aug 11, 2020
Merged

jkotas merged 2 commits into
dotnet:masterfrom
jozkee:fix_ca1836_3

Conversation

@jozkee

@jozkee jozkee commented Aug 10, 2020

Copy link
Copy Markdown
Member

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 a team and stephentoub August 10, 2020 20:42
@jozkee jozkee self-assigned this Aug 10, 2020
@ghost

ghost commented Aug 10, 2020

Copy link
Copy Markdown

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

@stephentoub stephentoub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice

@jozkee

jozkee commented Aug 10, 2020

Copy link
Copy Markdown
Member Author

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
Copy Markdown

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

ghost commented Aug 10, 2020

Copy link
Copy Markdown

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

jkotas commented Aug 11, 2020

Copy link
Copy Markdown
Member

"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