-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove unnecessary calls to Contains
for sets
#69179
Conversation
This commit removes calls to Contains if they are immediately followed by either Add or Remove.
src/Compilers/VisualBasic/Portable/Symbols/Source/SourceMemberContainerTypeSymbol.vb
Outdated
Show resolved
Hide resolved
Done with review pass (commit 1) |
I believe you should also set CA1865 to be a build warning in the editorconfig at the repo root to prevent more violations sneaking in future. |
Should I add it for all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes under Compilers LGTM (commit 2)
It should be in .globalconfig, not .editorconfig. |
This commit removes calls to
Contains
if they are immediately followed by eitherAdd
orRemove
.These calls were found during testing of a new analyzer (CA1865), see dotnet/roslyn-analyzers#6767 and dotnet/runtime#85490.