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 CA1307 for known non-string comparisons #4035

Merged
merged 2 commits into from
Aug 18, 2020

Conversation

mavasani
Copy link
Contributor

Fixes #2581
When we know that a comparison is between a string type receiver and a non-string type parameter OR that the method is not a string comparison method, do not report CA1307.

Fixes dotnet#2581
When we know that a comparison is between a string type receiver and a non-string type parameter, do not report CA1307
@mavasani mavasani requested a review from a team as a code owner August 18, 2020 16:01
Copy link
Contributor

@dotpaul dotpaul left a comment

Choose a reason for hiding this comment

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

🚢

@mavasani
Copy link
Contributor Author

Thanks!

@codecov
Copy link

codecov bot commented Aug 18, 2020

Codecov Report

Merging #4035 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           master    #4035    +/-   ##
========================================
  Coverage   95.63%   95.63%            
========================================
  Files        1156     1156            
  Lines      256439   256670   +231     
  Branches    15354    15367    +13     
========================================
+ Hits       245238   245464   +226     
- Misses       9242     9247     +5     
  Partials     1959     1959            

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.

False positive in CA1307 for string.IndexOf(char)
2 participants