-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Enable SA1000: Keywords should be spaced correctly #13973
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
|
Still draft? |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@iSazonov Please review and merge. |
|
|
||
| private bool TryGetRangeHeader(out string rangeHeader) | ||
| { | ||
| var rangeHeaderSv = new StringValues(); |
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.
@xtqqczze For my education - does an analyzer recognize the "var" pattern to convert to
StringValues rangeHeaderSv = new();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.
I am not aware of such an analyzer, but one could use RCS1012 codefix first.
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.
So we should apply RCS1012 and then apply a fix to the new pattern?
|
I'm seeing warnings on the following pattern in live analysis, I'm surprised CI did not fail:
PowerShell/src/Microsoft.Management.Infrastructure.CimCmdlets/RemoveCimInstanceCommand.cs Line 288 in db94377
This issue was fixed in DotNetAnalyzers/StyleCopAnalyzers#3187, and is in the v1.2.0-beta.261 release. |
CI makes clean loading packages. So I guess if you see the warning you need clean your local package cache. |
CI is now failing |
Originally posted by @rjmholt in #9900 (comment) |
|
Between tests for this PR passing (12 days ago), we merged IDE0090 PRs, which conflicted as the version of StyleCopAnalyzers in use at the time did not support target-typed new expressions properly. We could reduce the likelihood of similar issues occurring again by running tests again between approval and merge. |
Ah, clear! We catch this again :-) |
|
🎉 Handy links: |
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1000.md