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 suggest passing IFormatProvider to certain Convert methods #7244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CollinAlpert
Copy link
Contributor

Affected analyzer: SpecifyIFormatProviderAnalyzer
Affected diagnostic ID: CA1305

This PR prevents suggesting to pass an IFormatProvider to Convert.ToX methods where passing an IFormatProvider would change nothing.

Fixes #7154

@CollinAlpert CollinAlpert requested a review from a team as a code owner March 13, 2024 23:11
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 99.26290% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 96.47%. Comparing base (94749ce) to head (233b8d4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #7244     +/-   ##
=========================================
  Coverage   96.46%   96.47%             
=========================================
  Files        1432     1436      +4     
  Lines      342185   343191   +1006     
  Branches    11280    11295     +15     
=========================================
+ Hits       330100   331095    +995     
- Misses       9232     9238      +6     
- Partials     2853     2858      +5     

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.

CA1305 false positives: Convert.ToString(bool), Convert.ToChar(string), Convert.ToBoolean(strng)
1 participant