-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Added IDE analyzers checks and enabled certain checks #8336
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
Conversation
0b809ad to
de9558d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I love this!
I just want to have extra caution around the license header
4a9dc2c to
67bfb7d
Compare
…les to suggestion
manually fixed unresolvable cases
…tch the required text
clarified CTA on how to bypass the error
a489431 to
83fd3ba
Compare
Recent changes dotnet#8336 and dotnet#8350 collided to produce a build break on just-introduced formatting.
| dotnet_diagnostic.IDE0005.severity = warning | ||
|
|
||
| # Use explicit type instead of 'var' | ||
| dotnet_diagnostic.IDE0008.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
built-in: suggestion
apparent: suggestion
everything else: warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments from core team discussion.
| dotnet_diagnostic.IDE0008.severity = suggestion | ||
|
|
||
| # Populate switch | ||
| dotnet_diagnostic.IDE0010.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning
| dotnet_diagnostic.IDE0010.severity = suggestion | ||
|
|
||
| # Null check can be simplified | ||
| dotnet_diagnostic.IDE0016.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave suggestion, but open to moving to warning if an autofixer is available
| dotnet_diagnostic.IDE0016.severity = suggestion | ||
|
|
||
| # Object initialization can be simplified | ||
| dotnet_diagnostic.IDE0017.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion
| dotnet_diagnostic.IDE0017.severity = suggestion | ||
|
|
||
| # Variable declaration can be inlined | ||
| dotnet_diagnostic.IDE0018.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning
| dotnet_diagnostic.IDE0018.severity = suggestion | ||
|
|
||
| # Use pattern matching | ||
| dotnet_diagnostic.IDE0019.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning
| dotnet_diagnostic.IDE0041.severity = suggestion | ||
|
|
||
| # Variable declaration can be deconstructed | ||
| dotnet_diagnostic.IDE0042.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none
| dotnet_diagnostic.IDE0042.severity = suggestion | ||
|
|
||
| # Made field readonly | ||
| dotnet_diagnostic.IDE0044.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning
| dotnet_diagnostic.IDE0045.severity = suggestion | ||
| dotnet_diagnostic.IDE0046.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion
| dotnet_diagnostic.IDE0046.severity = suggestion | ||
|
|
||
| # Parentheses can be removed | ||
| dotnet_diagnostic.IDE0047.severity = suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none
| # Parentheses can be removed | ||
| dotnet_diagnostic.IDE0047.severity = suggestion | ||
|
|
||
| # Parentheses should be added for clarity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
***** start here for follow up
Related to #7174
Context
While working in the repo different code style issues are observed
Changes Made
warning, set the rules that are currently violated tosuggestionAll the work was done in separate commits to facilitate easier review.
Testing
Notes
The following checks to be added to #7174 to be gradually fixed: