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 |
AlekseyTs
left a comment
There was a problem hiding this comment.
Changes under Compilers LGTM (commit 2)
It should be in .globalconfig, not .editorconfig. |
This commit removes calls to
Containsif they are immediately followed by eitherAddorRemove.These calls were found during testing of a new analyzer (CA1865), see dotnet/roslyn-analyzers#6767 and dotnet/runtime#85490.