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

Fixes CA1854 replacing unrelated dictionaries with matching signatures #6387

Merged
merged 19 commits into from Apr 27, 2023

Conversation

Miizukii
Copy link
Contributor

@Miizukii Miizukii commented Dec 26, 2022

Changed Analyzer to first find ContainsKey() and than find all usages with the same unchanged key and dictionary reference in the guarded path.

Fixes: #6256, #6390, #6280

Changed Analyzer to first find ContainsKey and than find all usages with
the same unchanged key and dictionary reference in the guarded path.

Fixes: dotnet#6256
@Miizukii Miizukii requested a review from a team as a code owner December 26, 2022 16:08
@codecov
Copy link

codecov bot commented Dec 26, 2022

Codecov Report

Merging #6387 (fba19e4) into main (3e168a5) will decrease coverage by 0.02%.
The diff coverage is 86.94%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6387      +/-   ##
==========================================
- Coverage   96.41%   96.40%   -0.02%     
==========================================
  Files        1374     1374              
  Lines      320382   320858     +476     
  Branches    10314    10387      +73     
==========================================
+ Hits       308906   309320     +414     
- Misses       9008     9057      +49     
- Partials     2468     2481      +13     

@Miizukii
Copy link
Contributor Author

Miizukii commented Jan 8, 2023

is there still something that needs to be changed?

@Miizukii
Copy link
Contributor Author

@Youssef1313 or @mavasani could one of you do another review. Thanks

@mavasani
Copy link
Member

@buyaa-n Can you please review? Thanks!

@mavasani
Copy link
Member

@Miizukii for resolving merge conflicts

Copy link
Member

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

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

Thank you @Miizukii! LGTM

@buyaa-n buyaa-n merged commit 2420507 into dotnet:main Apr 27, 2023
11 checks passed
@github-actions github-actions bot added this to the vNext milestone Apr 27, 2023
@Miizukii Miizukii deleted the FixCA1854 branch April 28, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CA1854: Prefer the IDictionary.TryGetValue Fixer produces wrong code
4 participants