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

Do not report on awaitable-awaiter patterns #4639

Merged
merged 3 commits into from
Jan 5, 2021

Conversation

Evangelink
Copy link
Member

@Evangelink Evangelink commented Dec 30, 2020

Fix #4623

There is a first commit meant to ensure all code related to skipping the analysis is contained in the ShouldAnalyze method instead of being in multiple place. I suggest to review it first.

@Evangelink Evangelink requested a review from a team as a code owner December 30, 2020 21:41
{
return false;
}

// CA1000 says one shouldn't declare static members on generic types. So don't flag such cases.
if (methodSymbol.ContainingType.IsGenericType && methodSymbol.IsExternallyVisible())
if (methodSymbol.IsExternallyVisible())
Copy link
Member Author

Choose a reason for hiding this comment

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

Avoid doing this check twice.

@codecov
Copy link

codecov bot commented Dec 30, 2020

Codecov Report

Merging #4639 (63c67a1) into master (abb5bf7) will decrease coverage by 0.00%.
The diff coverage is 92.09%.

@@            Coverage Diff             @@
##           master    #4639      +/-   ##
==========================================
- Coverage   95.77%   95.77%   -0.01%     
==========================================
  Files        1193     1193              
  Lines      269067   269233     +166     
  Branches    16245    16267      +22     
==========================================
+ Hits       257706   257858     +152     
+ Misses       9278     9277       -1     
- Partials     2083     2098      +15     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CA1822 / CA1024 False-positive for awaitable pattern
2 participants