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 analyzer warning that is breaking the build #90136

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

eiriktsarpalis
Copy link
Member

Currently failing with error:

error CA1868: Do not guard 'HashSet.Add(string)' with 'HashSet.Contains(string)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1868)

@ghost ghost assigned eiriktsarpalis Aug 8, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 8, 2023
Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for fixing the build @eiriktsarpalis

BTW it would be great to understand why the build got broken (I imagine that enabling new analyzers should require a new PR that should simply fail and require a fix before being merged)

Edit: #89869 most likely run the CI checks before the new analyzer got enabled

@ghost
Copy link

ghost commented Aug 8, 2023

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

Issue Details

Currently failing with error:

error CA1868: Do not guard 'HashSet.Add(string)' with 'HashSet.Contains(string)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1868)
Author: eiriktsarpalis
Assignees: eiriktsarpalis
Labels:

area-Infrastructure-mono, needs-area-label

Milestone: -

@ViktorHofer
Copy link
Member

Fast merge to unblock CI.

@ViktorHofer ViktorHofer merged commit a409892 into dotnet:main Aug 8, 2023
@adamsitnik
Copy link
Member

Fast merge to unblock CI.

image

Jokes aside I am very supportive of that!

@eiriktsarpalis
Copy link
Member Author

I also want that badge now 🤣

@eiriktsarpalis eiriktsarpalis deleted the fix-analyzer-warning branch August 8, 2023 12:47
@ghost ghost locked as resolved and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-mono needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants