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 raise CA1849 when async version has fewer parameters #7318

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CollinAlpert
Copy link
Contributor

@CollinAlpert CollinAlpert commented May 24, 2024

Affected analyzer: UseAsyncMethodInAsyncContext
Affected diagnostic ID: CA1849

This PR prevents CA1849 being raised when the async alternative has fewer parameters than the sync method.

Fixes #7289

@CollinAlpert CollinAlpert requested a review from a team as a code owner May 24, 2024 15:41
Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.48%. Comparing base (bc8aca0) to head (ac3b9a9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7318    +/-   ##
========================================
  Coverage   96.47%   96.48%            
========================================
  Files        1443     1443            
  Lines      345400   345483    +83     
  Branches    11364    11365     +1     
========================================
+ Hits       333239   333350   +111     
+ Misses       9282     9256    -26     
+ Partials     2879     2877     -2     

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.

CA1849 suggests parameterless async methods to replace synchronous methods with parameters
1 participant