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

Don't emit CA1704 for interface implementations #6473

Merged
merged 11 commits into from
Mar 27, 2023

Conversation

Applesauce314
Copy link
Contributor

updates CA1704 as described in #6472.
if the method a parameter is part of is an interface implementation or an override, CA1704 is not emitted. This prevents warnings/errors that cannot be fixed if CA1725 is also active.

@Applesauce314 Applesauce314 requested a review from a team as a code owner February 2, 2023 12:52
@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Merging #6473 (b48b645) into main (23b0f3d) will increase coverage by 0.00%.
The diff coverage is 99.70%.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6473    +/-   ##
========================================
  Coverage   96.40%   96.41%            
========================================
  Files        1371     1371            
  Lines      318939   319253   +314     
  Branches    10265    10278    +13     
========================================
+ Hits       307480   307795   +315     
+ Misses       9002     9000     -2     
- Partials     2457     2458     +1     

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

Can you add a test for explicit interface implementation?

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

Thanks @Applesauce314. This LGTM 🎉

@Applesauce314
Copy link
Contributor Author

Can you add a test for explicit interface implementation?

Done

@Applesauce314

This comment was marked as outdated.

@Applesauce314
Copy link
Contributor Author

Final state:
Does not emit diagnostic if parameter is part of a member implementation that is an implicit or explicit interface implementation, or an override of a base member, unless the parameter is misspelled and does not match the name in any of the base or interface definitions.

@Youssef1313 Youssef1313 requested a review from mavasani February 6, 2023 12:15
@mavasani mavasani merged commit 222a516 into dotnet:main Mar 27, 2023
@github-actions github-actions bot added this to the vNext milestone Mar 27, 2023
@Applesauce314 Applesauce314 deleted the CA1704-fix-issue-6472 branch March 27, 2023 15:30
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.

3 participants