Repository navigation
Update SA1008 to not crash if there is no previous token - #3741
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3741 +/- ##
==========================================
- Coverage 97.40% 94.45% -2.95%
==========================================
Files 914 908 -6
Lines 108762 108717 -45
Branches 3284 3285 +1
==========================================
- Hits 105937 102688 -3249
- Misses 1847 5003 +3156
- Partials 978 1026 +48 |
|
Ready for review |
sharwell
left a comment
There was a problem hiding this comment.
I would prefer to not move in this direction. If token.SyntaxTree can be null somewhere, we should check for null at the location where a possible-null is originally introduced.
|
Alright. I fear it will be hard to fix "all" cases that way, but we will see what I can do. SA1008 should be easy anyway. |
145b958 to
105e147
Compare
|
Updated to only handle SA1008. |
105e147 to
dea9473
Compare
| switch (prevToken.Kind()) | ||
| { | ||
| case SyntaxKind.None: | ||
| return; |
There was a problem hiding this comment.
📝 This won't correctly handle the following top-level program:
( var a, var b) = (3, 3);
System.Console.WriteLine($"{a}");There was a problem hiding this comment.
Good catch! Didn't think of that.
Alright, I will have a look.
There was a problem hiding this comment.
I see now that you added both a leading and a trailing space in your example. What was your intention with the leading space? What is the expected result?
There was a problem hiding this comment.
It should behave the same way as this:
void Method()
{
( var a, var b) = (3, 3);
System.Console.WriteLine($"{a}");
}There was a problem hiding this comment.
As far as I can understand, this is a "don't care" case, since it is the first token on the line
dea9473 to
68c49ff
Compare
68c49ff to
6b7973e
Compare
|
Test execution seems to fail without a reason in the previous build. I noticed that both OpenCover and xunit.runner.console are quite old (from 2016 and 2018). What do you think about updating them? |
I think this is a different issue that I can likely work around in the build system. |
Absolutely, I didn't mean in this PR. It looked like the test runner just died before reporting the outcome in the c# 6 debug run and in the c# 12 debug run, all tests passed but opencover.console.exe exited with code 1 without saying why. Just looked weird, so upgrading them might be a good thing. Unless you already had ideas about it. |
…20) [](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [StyleCop.Analyzers](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers) | `1.2.0-beta.507` -> `1.2.0-beta.556` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>DotNetAnalyzers/StyleCopAnalyzers (StyleCop.Analyzers)</summary> ### [`v1.2.0-beta.556`](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/releases/tag/1.2.0-beta.556) [Compare Source](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/compare/1.2.0-beta.553...1.2.0-beta.556) #### What's Changed - Update SA1011 to forbid trailing space before the end of a switch case by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3674](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3674) - Rewrite IOperationWrapper as a wrapper structure around IOperation by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3611](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3611) - Update SA1202 to support interfaces (C# 8) and records (C# 9, 10) by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3694](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3694) - Update documentation for SA1308 to also mention prefix "t\_" by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3697](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3697) - Update SA1642 and its code fix to handle record structs correctly by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3696](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3696) - Update dependencies by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3700](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3700) - Mark several test classes as partial by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3702](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3702) - Add missing test files and fix inheritance by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3703](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3703) - Generate and validate derived test classes by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3704](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3704) - Update SA1011 to not require space before a range operator by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3709](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3709) - Update SA1131 to treat methods as constants by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3710](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3710) - Avoid allocations in CanWrap... methods by [@​martin-strecker-sonarsource](https://togithub.life-white.uk/martin-strecker-sonarsource) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3711) - Update SA1648 to accept inheritdoc on members implemented from static abstract/virtual interface members by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3715](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3715) - Update SA1600 to also handle records by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3725](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3725) - Update SA1119 to allow parenthesis around a ref ternary conditional expression when it is the left-hand side of an assigment by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3737](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3737) - Update SA1119 to allow parenthesized switch expressions followed by an invocation by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3733](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3733) - Add c# 12 test project by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3734](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3734) - Run tests in parallel jobs by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3740](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3740) - Update SA1010 to accept whitespace before collection initializers by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3745](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3745) - Update SA1513 to not require a blank line if the closing brace is at the end of a collection expression by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3746](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3746) - Update SA1118 to allow multi-line collection expressions by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3749](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3749) - Update SA1009 to require a space after the closing parenthesis if it is followed by ++ or -- from a prefix unary expression by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3750](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3750) - Update SA1008 to allow space before the opening parenthesis of a using alias definition of a tuple type by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3748](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3748) - Update documentation for SA1102 to contain compilable code examples by [@​arphox](https://togithub.life-white.uk/arphox) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3755) - Update SA1008 to not crash if there is no previous token by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3741](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3741) - Change default value of test property CodeActionValidationMode to SemanticStructure instead of None and update so that tests still pass by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3753](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3753) - Allow inheritdoc for class constructors with base types by [@​MartyIX](https://togithub.life-white.uk/MartyIX) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3719) - Fix that SA1134 Fix All maybe non-deterministic by [@​pdelvo](https://togithub.life-white.uk/pdelvo) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/2853](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/2853) - Coverage improvements by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3675](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3675) - Fix SA1131 to not treat "complex" expressions as a literal by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3760](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3760) #### New Contributors - [@​martin-strecker-sonarsource](https://togithub.life-white.uk/martin-strecker-sonarsource) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3711) - [@​arphox](https://togithub.life-white.uk/arphox) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3755) - [@​MartyIX](https://togithub.life-white.uk/MartyIX) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3719) **Full Changelog**: DotNetAnalyzers/StyleCopAnalyzers@1.2.0-beta.507...1.2.0-beta.556 ### [`v1.2.0-beta.553`](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/releases/tag/1.2.0-beta.553) [Compare Source](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/compare/1.2.0-beta.507...1.2.0-beta.553) ##### What's Changed - Update SA1011 to forbid trailing space before the end of a switch case by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3674](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3674) - Rewrite IOperationWrapper as a wrapper structure around IOperation by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3611](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3611) - Update SA1202 to support interfaces (C# 8) and records (C# 9, 10) by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3694](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3694) - Update documentation for SA1308 to also mention prefix "t\_" by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3697](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3697) - Update SA1642 and its code fix to handle record structs correctly by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3696](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3696) - Update dependencies by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3700](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3700) - Mark several test classes as partial by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3702](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3702) - Add missing test files and fix inheritance by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3703](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3703) - Generate and validate derived test classes by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3704](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3704) - Update SA1011 to not require space before a range operator by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3709](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3709) - Update SA1131 to treat methods as constants by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3710](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3710) - Avoid allocations in CanWrap... methods by [@​martin-strecker-sonarsource](https://togithub.life-white.uk/martin-strecker-sonarsource) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3711) - Update SA1648 to accept inheritdoc on members implemented from static abstract/virtual interface members by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3715](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3715) - Update SA1600 to also handle records by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3725](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3725) - Update SA1119 to allow parenthesis around a ref ternary conditional expression when it is the left-hand side of an assigment by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3737](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3737) - Update SA1119 to allow parenthesized switch expressions followed by an invocation by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3733](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3733) - Add c# 12 test project by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3734](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3734) - Run tests in parallel jobs by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3740](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3740) - Update SA1010 to accept whitespace before collection initializers by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3745](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3745) - Update SA1513 to not require a blank line if the closing brace is at the end of a collection expression by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3746](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3746) - Update SA1118 to allow multi-line collection expressions by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3749](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3749) - Update SA1009 to require a space after the closing parenthesis if it is followed by ++ or -- from a prefix unary expression by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3750](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3750) - Update SA1008 to allow space before the opening parenthesis of a using alias definition of a tuple type by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3748](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3748) - Update documentation for SA1102 to contain compilable code examples by [@​arphox](https://togithub.life-white.uk/arphox) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3755) - Update SA1008 to not crash if there is no previous token by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3741](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3741) - Change default value of test property CodeActionValidationMode to SemanticStructure instead of None and update so that tests still pass by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3753](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3753) - Allow inheritdoc for class constructors with base types by [@​MartyIX](https://togithub.life-white.uk/MartyIX) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3719) - Fix that SA1134 Fix All maybe non-deterministic by [@​pdelvo](https://togithub.life-white.uk/pdelvo) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/2853](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/2853) - Coverage improvements by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3675](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3675) ##### New Contributors - [@​martin-strecker-sonarsource](https://togithub.life-white.uk/martin-strecker-sonarsource) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3711) - [@​arphox](https://togithub.life-white.uk/arphox) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3755) - [@​MartyIX](https://togithub.life-white.uk/MartyIX) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3719) **Full Changelog**: DotNetAnalyzers/StyleCopAnalyzers@1.2.0-beta.507...1.2.0-beta.553 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9pm,before 6am" in timezone Europe/Zurich, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/smartive/cas-fee-adv-mumble-api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…591) [](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [StyleCop.Analyzers](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers) | `1.2.0-beta.507` -> `1.2.0-beta.556` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>DotNetAnalyzers/StyleCopAnalyzers (StyleCop.Analyzers)</summary> ### [`v1.2.0-beta.556`](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/releases/tag/1.2.0-beta.556) [Compare Source](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/compare/1.2.0-beta.553...1.2.0-beta.556) #### What's Changed - Update SA1011 to forbid trailing space before the end of a switch case by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3674](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3674) - Rewrite IOperationWrapper as a wrapper structure around IOperation by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3611](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3611) - Update SA1202 to support interfaces (C# 8) and records (C# 9, 10) by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3694](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3694) - Update documentation for SA1308 to also mention prefix "t\_" by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3697](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3697) - Update SA1642 and its code fix to handle record structs correctly by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3696](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3696) - Update dependencies by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3700](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3700) - Mark several test classes as partial by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3702](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3702) - Add missing test files and fix inheritance by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3703](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3703) - Generate and validate derived test classes by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3704](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3704) - Update SA1011 to not require space before a range operator by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3709](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3709) - Update SA1131 to treat methods as constants by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3710](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3710) - Avoid allocations in CanWrap... methods by [@​martin-strecker-sonarsource](https://togithub.life-white.uk/martin-strecker-sonarsource) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3711) - Update SA1648 to accept inheritdoc on members implemented from static abstract/virtual interface members by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3715](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3715) - Update SA1600 to also handle records by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3725](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3725) - Update SA1119 to allow parenthesis around a ref ternary conditional expression when it is the left-hand side of an assigment by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3737](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3737) - Update SA1119 to allow parenthesized switch expressions followed by an invocation by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3733](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3733) - Add c# 12 test project by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3734](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3734) - Run tests in parallel jobs by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3740](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3740) - Update SA1010 to accept whitespace before collection initializers by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3745](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3745) - Update SA1513 to not require a blank line if the closing brace is at the end of a collection expression by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3746](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3746) - Update SA1118 to allow multi-line collection expressions by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3749](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3749) - Update SA1009 to require a space after the closing parenthesis if it is followed by ++ or -- from a prefix unary expression by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3750](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3750) - Update SA1008 to allow space before the opening parenthesis of a using alias definition of a tuple type by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3748](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3748) - Update documentation for SA1102 to contain compilable code examples by [@​arphox](https://togithub.life-white.uk/arphox) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3755) - Update SA1008 to not crash if there is no previous token by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3741](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3741) - Change default value of test property CodeActionValidationMode to SemanticStructure instead of None and update so that tests still pass by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3753](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3753) - Allow inheritdoc for class constructors with base types by [@​MartyIX](https://togithub.life-white.uk/MartyIX) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3719) - Fix that SA1134 Fix All maybe non-deterministic by [@​pdelvo](https://togithub.life-white.uk/pdelvo) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/2853](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/2853) - Coverage improvements by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3675](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3675) - Fix SA1131 to not treat "complex" expressions as a literal by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3760](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3760) #### New Contributors - [@​martin-strecker-sonarsource](https://togithub.life-white.uk/martin-strecker-sonarsource) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3711) - [@​arphox](https://togithub.life-white.uk/arphox) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3755) - [@​MartyIX](https://togithub.life-white.uk/MartyIX) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3719) **Full Changelog**: DotNetAnalyzers/StyleCopAnalyzers@1.2.0-beta.507...1.2.0-beta.556 ### [`v1.2.0-beta.553`](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/releases/tag/1.2.0-beta.553) [Compare Source](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/compare/1.2.0-beta.507...1.2.0-beta.553) ##### What's Changed - Update SA1011 to forbid trailing space before the end of a switch case by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3674](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3674) - Rewrite IOperationWrapper as a wrapper structure around IOperation by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3611](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3611) - Update SA1202 to support interfaces (C# 8) and records (C# 9, 10) by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3694](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3694) - Update documentation for SA1308 to also mention prefix "t\_" by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3697](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3697) - Update SA1642 and its code fix to handle record structs correctly by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3696](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3696) - Update dependencies by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3700](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3700) - Mark several test classes as partial by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3702](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3702) - Add missing test files and fix inheritance by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3703](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3703) - Generate and validate derived test classes by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3704](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3704) - Update SA1011 to not require space before a range operator by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3709](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3709) - Update SA1131 to treat methods as constants by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3710](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3710) - Avoid allocations in CanWrap... methods by [@​martin-strecker-sonarsource](https://togithub.life-white.uk/martin-strecker-sonarsource) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3711) - Update SA1648 to accept inheritdoc on members implemented from static abstract/virtual interface members by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3715](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3715) - Update SA1600 to also handle records by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3725](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3725) - Update SA1119 to allow parenthesis around a ref ternary conditional expression when it is the left-hand side of an assigment by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3737](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3737) - Update SA1119 to allow parenthesized switch expressions followed by an invocation by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3733](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3733) - Add c# 12 test project by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3734](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3734) - Run tests in parallel jobs by [@​sharwell](https://togithub.life-white.uk/sharwell) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3740](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3740) - Update SA1010 to accept whitespace before collection initializers by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3745](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3745) - Update SA1513 to not require a blank line if the closing brace is at the end of a collection expression by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3746](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3746) - Update SA1118 to allow multi-line collection expressions by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3749](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3749) - Update SA1009 to require a space after the closing parenthesis if it is followed by ++ or -- from a prefix unary expression by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3750](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3750) - Update SA1008 to allow space before the opening parenthesis of a using alias definition of a tuple type by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3748](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3748) - Update documentation for SA1102 to contain compilable code examples by [@​arphox](https://togithub.life-white.uk/arphox) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3755) - Update SA1008 to not crash if there is no previous token by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3741](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3741) - Change default value of test property CodeActionValidationMode to SemanticStructure instead of None and update so that tests still pass by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3753](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3753) - Allow inheritdoc for class constructors with base types by [@​MartyIX](https://togithub.life-white.uk/MartyIX) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3719) - Fix that SA1134 Fix All maybe non-deterministic by [@​pdelvo](https://togithub.life-white.uk/pdelvo) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/2853](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/2853) - Coverage improvements by [@​bjornhellander](https://togithub.life-white.uk/bjornhellander) in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3675](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3675) ##### New Contributors - [@​martin-strecker-sonarsource](https://togithub.life-white.uk/martin-strecker-sonarsource) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3711) - [@​arphox](https://togithub.life-white.uk/arphox) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3755) - [@​MartyIX](https://togithub.life-white.uk/MartyIX) made their first contribution in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719](https://togithub.life-white.uk/DotNetAnalyzers/StyleCopAnalyzers/pull/3719) **Full Changelog**: DotNetAnalyzers/StyleCopAnalyzers@1.2.0-beta.507...1.2.0-beta.553 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ThorstenSauter/NoPlan). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Updated
[StyleCop.Analyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers)
from 1.1.118 to 1.3.180.
<details>
<summary>Release notes</summary>
_Sourced from [StyleCop.Analyzers's
releases](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/releases)._
## 1.3.180
This is the first stable StyleCop.Analyzers release since 1.1.118. It
includes the entire 1.2 beta line and the 1.3 revival: the analyzers now
understand C# 8 through the C# 15 previews, many long-standing bugs are
fixed, and the project is once again actively maintained. Thank you to
everyone who contributed code, reviews, translations and bug reports
over the long gap.
## Highlights
- **C# 8 through C# 15 language support.** Rules now understand records
and record structs, file-scoped namespaces, global usings, raw and
interpolated strings, primary constructors, collection expressions,
partial properties, events and constructors, `allows ref struct`, C# 14
extension blocks and the `field` keyword, and C# 15 preview unions with
the `closed` and `safe` modifiers, instead of ignoring that syntax or
crashing on it.
([#4142](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4142),
[#4139](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4139),
[#4137](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4137),
[#4163](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4163),
[#4148](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4148),
[#4191](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4191),
[#4193](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4193))
- **New rules.** SA1143 checks that wrapped conditional (`?:`)
expressions are laid out consistently, SA1315 requires overriding and
implementing parameters to keep their inherited names, SA1317 reports
identifiers that use letters outside basic Latin A–Z, SA1653 reports
`<summary>` documentation on more than one part of a partial type, and
SA1654 reports escaped generic brackets in `cref`s (for example
`List<T>` vs `List{T}`). SX1412 is an opt-in alternative to SA1412
that requires UTF-8 without a BOM. All of these except SX1412 are on by
default as warnings.
([#3942](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3942),
[#4299](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4299),
[#4318](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4318),
[#4314](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4314),
[#4315](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4315),
[#4328](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4328))
- **Better code fixes.** The member-ordering rules (SA1201, SA1202,
SA1203, SA1204 and SA1214) now offer their code fix, including Fix All.
Many other rules gained fixes, and existing fixes keep comments, trivia,
custom indentation and the document's line endings, and use the
compiler's batch Fix All.
([#4312](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4312),
[#4076](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4076),
[#4199](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4199),
[#4108](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4108),
[#4229](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4229),
[#4360](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4360))
- **More configuration.** Every setting can be set in `.editorconfig`.
New settings include `orderingRules.memberKindOrder`,
`orderingRules.accessibilityOrder` and
`layoutRules.allowBracelessIfStatements` (braceless `if`s are off by
default; the accessibility order default is unchanged).
([#4221](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4221),
[#3285](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3285),
[#4324](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4324),
[#4359](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4359),
[#4319](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4319))
- **Fewer false positives and crash fixes.** A long backlog of spacing,
layout, documentation, naming and maintainability issues was cleared,
including several crashes and incorrect code fixes found by fuzzing.
- **Localization and documentation.** This release adds Simplified
Chinese (`zh-CN`) resources and documentation, finishes the Czech
translations, and includes more translations of code-fix documentation
text (Czech, Dutch, Russian and others). Rule documentation and status
are published on GitHub Pages.
([#4285](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4285),
[#4286](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4286),
[#3374](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3374),
[#3944](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3944),
[#3900](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3900),
[#4220](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4220),
[#4218](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4218))
- **Packaging and engineering.** The package has an icon and a README,
and PDBs are embedded in the DLLs (there is no separate symbols
package). Packages are published from GitHub Actions using nuget.org
trusted publishing. CI runs on GitHub Actions on Linux, the build uses
the .NET 10 SDK, and Renovate keeps dependencies current. The analyzers
still target the same Roslyn version, so they work with the same
compilers and IDEs as before.
([#4320](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4320),
[#4204](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4204),
[#4173](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4173),
[#4123](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4123),
[#4105](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4105),
[#4126](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4126),
[#4231](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4231))
## Behavior changes worth knowing about
Upgrading from 1.1.118, or from a 1.2 beta, may produce new or different
diagnostics:
- **Rules now cover newer syntax.** Ordering, layout, spacing and
documentation rules now analyze records, primary constructors,
collection expressions, extension blocks, unions and other newer
constructs. They used to skip these, so expect new warnings in code that
uses them.
- **New rules on by default:** SA1143, SA1315, SA1317, SA1653 and SA1654
are enabled as warnings. SX1412 is off by default.
- **Extension members need documentation.** SA1600 no longer treats C#
14 extension blocks as private, so their public members must be
documented. SA1600 also reports undocumented record primary constructor
parameters.
([#4163](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4163),
[#4213](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4213))
- **Partial types and members.** For partial methods, properties,
indexers, constructors, events and types, documenting one part is enough
(SA1600 leaves the check for partial members to SA1601). SA1653 reports
a `<summary>` on more than one part, but ignores generated partial
declarations such as WPF `*.g.cs` files.
([#4148](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4148),
[#4149](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4149),
[#4152](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4152),
[#4308](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4308),
[#4299](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4299),
[#4393](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4393))
- **SA1500 and SA1137** now check the brackets of multi-line collection
expressions. SA1137 accepts aligning a closing bracket with an inline
opening bracket (one that follows other code on the same line) or with
the opening line's indentation. Both rules offer an alternate, tab-aware
code fix that aligns the closing bracket with the opening bracket.
([#4396](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4396),
[#4400](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4400))
- **SA1642** expects "union" wording in constructor summaries of C# 15
union types, for example "Initializes a new instance of the … union.",
and "interface" rather than "class" in the standard text for static
constructors in interfaces.
([#4193](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4193),
[#4386](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4386))
- **SA1121** reports the built-in type inside a using alias target
instead of every use of the alias, and no longer reports `IntPtr` and
`UIntPtr` in XML documentation `cref`s, or in shared source compiled for
targets where `nint` isn't equivalent. SA1121 and SA1125 also report
System types in using alias targets.
([#4287](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4287),
[#4395](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4395),
[#4175](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4175))
- **SA1316** always reports explicitly written tuple element names, even
when `includeInferredTupleElementNames` is off.
([#4202](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4202))
- **SA1312** no longer reports `_` for `foreach` variables and `using`
declarations.
([#4203](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4203))
- **SA1205** treats the `file` modifier as an access modifier.
([#4198](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4198))
- **SA1304** now analyzes `protected readonly` fields when SA1307 is
enabled.
([#4217](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4217))
- **SA1122** reports empty interpolated and raw string literals, and
**SA1130** reports anonymous methods whose parameter names differ from
the delegate's.
([#4178](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4178),
[#4179](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4179))
- **SA1407** now checks bitwise operators (`&`, `|`, `^`) and `>>>`.
**SA1408** reports `??` mixed with `&&` or `||` without parentheses.
([#4289](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4289),
[#4323](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4323))
- **SA1200** reports and moves `extern alias` directives using the same
placement setting as `using` directives.
([#4313](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4313))
- **SA1017** requires a space after a parameter's or type parameter's
attribute list, for example `[NotNullWhen(true)] out string? foo`.
([#4321](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4321))
- **SA1633:** disabling one required-header rule, for example SA1637, no
longer turns off the other header checks.
([#4276](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4276))
- **SA1202** treats explicit interface events as public, like other
explicit interface members. **SA1137** aligns type members to their most
common indentation instead of the first member. **SA1649** picks the
type that names the file according to the
`maintainabilityRules.topLevelTypes` setting.
([#4281](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4281),
[#4301](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4301),
[#4316](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4316))
- **SA1600** respects the `documentInterfaces` setting. With
`documentInterfaces: false`, public interfaces and their members are
still required when `documentExposedElements` is on. With
`documentInterfaces: "exposed"`, members of interfaces that aren't
actually exposed are not reported.
([#3140](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3140),
[#4346](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4346),
[#4343](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4343))
- **SA1135** no longer reports using directives that start with an
`extern alias`.
([#4341](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4341))
- **SA1143** allows branches that continue onto more lines, and accepts
an expanded conditional whose condition spans several lines when the `?`
and `:` lines line up and are indented past the condition's last line.
The SA1143 code fix keeps multi-line branches intact.
([#4336](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4336),
[#4374](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4374),
[#4392](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4392))
- **The default rule set is complete**, so rules that were missing from
it are now listed with their default severity.
([#4115](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4115))
- **Packaging:** the separate `.symbols.nupkg` is gone, because PDBs are
now embedded in the DLLs.
([#4173](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4173))
## All changes
### Fixes
* Fix SA1504, SA1413, SA1402, SA1135, and blank lines above
documentation comments by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4210
* Update SettingsHelper to not throw exception if the settings file can
not be read by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3935
* SA1316: always check explicit element names in tuple expressions by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4202
* SA1118: apply the multi-line argument exceptions to attribute
arguments by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4195
* SA1205: treat the C# 11 file modifier as an access modifier by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4198
* Update SA1623 and SA1624 to not trigger if the summary contains an
inheritdoc element by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3880
* Fix SA1627/SA1651 crash on <include> with no documented member by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4380
... (truncated)
## 1.3.177-beta
A small follow-up to 1.3.171-beta. It accepts a common layout for
collection-expression brackets and strengthens the settings default
tests.
## Highlights
- **Inline collection bracket alignment.** SA1137 now accepts aligning a
collection expression's closing bracket with an opening bracket that
follows code on the same line, and both SA1137 and SA1500 offer an
alternate fix that preserves that layout.
([#4400](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4400))
## Behavior changes worth knowing about
- **SA1137** no longer reports when a multi-line collection expression's
closing bracket is aligned with an inline opening bracket (one that
follows other code on the same line). Aligning with the opening line's
indentation remains accepted. Both **SA1137** and **SA1500** now offer
an alternate code fix that aligns the closing bracket with the opening
bracket, with tab-aware column checks.
([#4400](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4400),
fixes
[#4399](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/4399))
## All changes
### Fixes
* SA1137: accept inline collection bracket alignment by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4400
### Infrastructure and build
* Improve settings tests slightly by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4397
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.171-beta...1.3.177-beta
## 1.3.171-beta
A reliability-focused follow-up to 1.3.151-beta. It fixes several
crashes and broken code fixes, checks the layout of multi-line
collection expressions, and reduces false positives in SA1121, SA1143
and SA1653.
## Highlights
- **Crash and code fix fixes.** These cover a crash in SA1627/SA1651 on
`<include>`, crashes and an infinite loop in SA1500 and its code fix,
crashes in the SA1642 and using-directive code fixes, and a using code
fix that rewrote a non-generic `System.ValueTuple` alias.
([#4380](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4380),
[#4383](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4383),
[#4382](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4382),
[#4384](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4384),
[#4381](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4381),
[#4385](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4385))
- **Collection expression layout.** SA1500 and SA1137 now check the
brackets of multi-line collection expressions.
([#4396](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4396))
- **Fewer false positives.** SA1121 keeps `IntPtr` and `UIntPtr` where
`nint` and `nuint` would be wrong, SA1653 ignores generated partial
declarations such as WPF `*.g.cs` files, and the SA1143 fix keeps
multi-line branches intact.
([#4395](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4395),
[#4393](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4393),
[#4392](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4392))
## Behavior changes worth knowing about
- **SA1500** now checks multi-line collection expressions, and
**SA1137** checks the alignment of their closing bracket. Expect new
warnings where a closing `]` shares a line with the last element.
([#4396](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4396))
- **SA1642** expects "interface" rather than "class" in the standard
text for static constructors in interfaces, for example "Initializes
static members of the … interface."
([#4386](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4386))
- **SA1121** no longer reports `IntPtr` and `UIntPtr` in XML
documentation `cref`s, or in shared source compiled for targets where
`nint` isn't equivalent.
([#4395](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4395))
- **SA1653** ignores `<summary>` tags in generated partial declarations.
([#4393](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4393))
## All changes
### Fixes
* Fix collection expression bracket layout in SA1500 and SA1137 by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4396
* SA1121: Preserve native integer compatibility in crefs and linked
targets by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4395
* SA1653: Ignore summary tags in generated partial declarations by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4393
* Fix SA1627/SA1651 crash on <include> with no documented member by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4380
* Fix SA1500 NRE on a top-level block at the start of a file by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4383
* Fix SA1500 code fix infinite loop on unmatched braces by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4382
* Fix SA1642 code fix for static constructors in generic interfaces by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4384
* Fix NRE in using code fix when qualifying alias-any-type usings by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4381
* Fix using code fix rewriting non-generic System.ValueTuple alias by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4385
* Use 'interface' in SA1642 standard text for interface static
constructors by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4386
* SA1143: Preserve multiline branches when aligning closing delimiters
by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4392
### Infrastructure and build
* Update dotnet monorepo by @renovate[bot] in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4387
* Update dependency Microsoft.CodeAnalysis.Analyzers to
5.11.0-1.26521.10 by @renovate[bot] in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4347
* Update dependency Microsoft.CodeAnalysis.Analyzers to 5.11.0-1.26525.1
by @renovate[bot] in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4379
* Update actions/setup-dotnet action to v6.1.0 by @renovate[bot] in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4394
* Update dependency node to v26 by @renovate[bot] in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4389
* Update dependency dotnet-reportgenerator-globaltool to v5.5.12 by
@renovate[bot] in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4388
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.151-beta...1.3.171-beta
## 1.3.151-beta
A small follow-up to 1.3.149-beta. SA1143 now accepts conditional
expressions whose condition spans several lines.
## Behavior changes worth knowing about
- **SA1143** no longer reports an expanded conditional expression whose
condition spans several lines, as long as the `?` and `:` lines line up
and are indented past the condition's last line. The code fix still
flattens the condition onto one line.
([#4374](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4374))
## Fixes
* SA1143: Allow multiline conditions by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4374
## Infrastructure and build
* Upgrade c# 15 test project to use prerelease 5.11.x now that Visual
Studio 18.11 is out by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4373
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.149-beta...1.3.151-beta
## 1.3.149-beta
A follow-up to 1.3.133-beta, centered on code fixes: five rules that
only reported problems now offer fixes, and code fixes keep the
document's line endings. SA1202 also gets a configurable accessibility
order. Thanks to @bjornhellander for moving the repo itself onto the
latest StyleCop.Analyzers.
## Highlights
- **New code fixes** for SA1117 (put each parameter on its own line),
SA1114 (remove blank lines after the opening delimiter), SA1612 (reorder
and complete `<param>` tags) and SA1653 (keep one partial `<summary>`,
converting the others to `<content>` or removing duplicates). The SA1314
rename now also updates type parameter references in `cref`s.
([#4353](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4353),
[#4352](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4352),
[#4354](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4354),
[#4372](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4372),
[#4361](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4361))
- **Line endings preserved.** Code fixes that insert or move lines
follow the document's existing newline sequence instead of mixing CRLF
and LF.
([#4360](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4360))
- **Configurable SA1202 order.** The new
`orderingRules.accessibilityOrder` setting, or
`stylecop.ordering.accessibilityOrder` in EditorConfig, customizes the
accessibility order. The default is unchanged.
([#4359](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4359))
## Behavior changes worth knowing about
- **SA1114** no longer reports the first item when only conditional
compilation directives separate it from the opening delimiter.
([#4356](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4356))
- **SA1009** no longer reports a multi-line tuple whose opening and
closing parentheses are each on their own line.
([#4358](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4358))
- **SA1653**'s message now mentions removing duplicate summaries as well
as using `<content>`.
([#4372](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4372))
- **Older compilers and IDEs:** light-up fallbacks for newer base syntax
types were fixed, which may change results on older Roslyn hosts.
([#4357](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4357))
## All changes
### Enhancements
* SA1117: Add a code fix for inconsistent parameter lines by @AArnott
in https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4353
* SA1114: Add code fix for blank lines after opening delimiter by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4352
* SA1612: add parameter documentation code fix by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4354
* SA1653: add code fix for partial summaries by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4372
* SA1202: Add configurable accessibility ordering by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4359
* SA1314: Rename type parameters in documentation crefs by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4361
### Fixes
* Preserve document line endings in code fixes by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4360
* SA1114: Allow conditional directives before list items by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4356
* SA1009: Allow multiline tuple parenthesis layout by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4358
* Fix light-up fallbacks for base syntax types by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4357
### Documentation
* SA1306: Clarify protected field naming by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4355
### Infrastructure and build
* Upgrade StyleCop.Analyzers and fix warnings by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4371
* Use CommonData.EndOfLineSequences for line ending theories by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4366
* Update becheran/mlc action to v1.3.0 by @renovate[bot] in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4370
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.133-beta...1.3.149-beta
## 1.3.133-beta
A follow-up to 1.3.109-beta. It fixes how SA1600 handles the
`documentInterfaces` setting, fixes several crashes and code-fix bugs
found by fuzzing, and adds a code fix for SA1648. Thanks to
@sbe-schleupen for the SA1135 fix, their first contribution.
## Highlights
- **SA1600 interface documentation settings.** `documentInterfaces` adds
to the general accessibility settings again, as it originally did, and
`"exposed"` now uses each interface's effective accessibility.
([#4346](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4346),
[#4343](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4343))
- **Robustness.** Fuzzing turned up crashes and incorrect code fixes,
including a SA1003 crash on incomplete code and a SA1316 rename that
missed references. These are fixed.
([#4344](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4344))
- **Code fixes and messages.** SA1648 has a new code fix that removes an
invalid `<inheritdoc/>`, and SA1315's message now names the expected
parameter name.
([#4337](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4337),
[#4351](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4351))
## Behavior changes worth knowing about
- **SA1600** with `documentInterfaces: false` again requires
documentation on public interfaces and their members when
`documentExposedElements` is on. Earlier 1.3 betas had stopped requiring
it, so warnings may come back.
([#4346](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4346))
- **SA1600** with `documentInterfaces: "exposed"` no longer reports
members of interfaces that aren't actually exposed, such as internal
interfaces when `documentInternalElements` is false, or nested
interfaces inside non-public types.
([#4343](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4343))
- **SA1135** no longer reports using directives that start with an
`extern alias`.
([#4341](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4341))
- **SA1315**'s diagnostic message now includes the expected name or
names.
([#4351](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4351))
## All changes
### Fixes
* SA1600: Restore additive interface documentation settings by @AArnott
in https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4346
* SA1600: Respect effective accessibility in exposed interface
documentation by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4343
* SA1135: Using directives should be qualified occurs with external
alias by @sbe-schleupen in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4341
* Fix crashes and code fixes found by syntax fuzzing by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4344
### Enhancements
* SA1648: Add code fix to remove invalid inheritdoc by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4337
* SA1315: Include expected parameter names in diagnostics by @AArnott
in https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4351
### Infrastructure and build
* Add a local fuzz harness for analyzers and code fixes by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4350
* Fix VB roslyn package dependency version by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4349
## New Contributors
* @sbe-schleupen made their first contribution in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4341
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.109-beta...1.3.133-beta
## 1.3.109-beta
A follow-up to 1.3.98-beta. It eases several layout rules that were too
strict, including the new SA1143, adds a rule for generic `cref` syntax,
and improves code fixes. Thanks to @bgrainger for the SA1143 fix, their
first contribution.
## Highlights
- **Fewer false positives.** SA1143 allows branches that continue onto
more lines. SA1118 allows multi-line string and switch-expression
arguments. SA1500 and SA1513 allow an operator such as `??` right after
a switch expression's closing brace.
([#4336](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4336),
[#4331](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4331),
[#4333](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4333),
[#4334](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4334))
- **New rule SA1654** reports escaped generic brackets in XML
documentation `cref`s, for example `List<T>`, and its code fix
converts them to `List{T}`.
([#4328](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4328))
- **Code fixes.** SA1115 has a new code fix, SA1003's Fix All edits each
document in one pass, and the SA1501 fix no longer crashes at the end of
a file.
([#4326](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4326),
[#4329](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4329),
[#4327](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4327))
## Behavior changes worth knowing about
- **New rule on by default:** SA1654 (use `{T}` rather than escaped
`<T>` in `cref` attributes) is enabled as a warning.
([#4328](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4328))
- **Fewer diagnostics** from SA1143, SA1118, SA1500 and SA1513 in the
cases described above.
([#4336](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4336),
[#4331](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4331),
[#4333](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4333),
[#4334](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4334))
## All changes
### Enhancements
* SA1654: encode generic brackets in cref by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4328
* Implement a code fix for SA1115 by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4326
* SA1003: batch Fix All edits per document by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4329
### Fixes
* Allow multiline conditional expressions by @bgrainger in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4336
* SA1118: Allow multiline string arguments by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4331
* SA1118: Allow multiline switch expressions with single-line headers by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4333
* SA1500/SA1513: Allow continuations after switch expression closing
braces by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4334
* SA1501: Handle code fixes at end of file by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4327
## New Contributors
* @bgrainger made their first contribution in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4336
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.98-beta...1.3.109-beta
## 1.3.98-beta
This release adds three new rules and a long-requested code fix, makes
member ordering and braceless guard clauses configurable, and tightens
several existing rules. The package also has an icon now.
## Highlights
- **New rules.** SA1143 checks that wrapped conditional (`?:`)
expressions are laid out consistently. SA1315 checks that overriding and
implementing parameters keep their inherited names. SX1412 is an opt-in
alternative to SA1412 that requires UTF-8 without a BOM. All three come
with code fixes.
([#4318](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4318),
[#4314](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4314),
[#4315](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4315))
- **Member-ordering code fix enabled.** SA1201, SA1202, SA1203, SA1204
and SA1214 now offer their code fix, including Fix All. It had been
turned off until it was stable.
([#4312](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4312))
- **More configuration.** The new `orderingRules.memberKindOrder`
setting customizes the SA1201 member-kind order, and
`layoutRules.allowBracelessIfStatements` lets SA1501 and SA1503 allow
compact guard clauses. Both are off by default.
([#4324](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4324),
[#4319](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4319))
- **Package icon.** NuGet now shows the StyleCop.Analyzers icon.
([#4320](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4320))
## Behavior changes worth knowing about
- **New rules on by default:** SA1143 (conditional expression
formatting,
[#4318](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4318))
and SA1315 (parameter names must match inherited names,
[#4314](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4314))
are enabled as warnings. SX1412 is off by default.
- **SA1200** now reports and moves `extern alias` directives using the
same placement setting as `using` directives.
([#4313](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4313))
- **SA1017** now requires a space after a parameter's or type
parameter's attribute list, for example `[NotNullWhen(true)] out string?
foo`.
([#4321](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4321))
- **SA1408** now reports `??` mixed with `&&` or `||` without
parentheses.
([#4323](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4323))
- **SA1649** picks the type that names the file according to the
`maintainabilityRules.topLevelTypes` setting, so the expected file name
may change.
([#4316](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4316))
## All changes
### Enhancements
* SA1143: Format conditional expressions consistently by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4318
* SA1315: Match inherited parameter names by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4314
* SX1412: Add UTF-8 without BOM rule by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4315
* Enable element order code fix provider by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4312
* SA1201: support configurable member-kind ordering by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4324
* SA1501/SA1503: Allow configurable braceless if guards by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4319
* Adopt proposed StyleCop.Analyzers icon by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4320
### Fixes
* SA1200: Treat extern alias directives like using directives by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4313
* SA1017: Require spacing after parameter attributes by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4321
* SA1408: Include null-coalescing precedence by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4323
* SA1649: Respect top-level type settings by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4316
### Documentation
* Clarify documentation requirement settings and rule interactions by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4322
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.82-beta...1.3.98-beta
## 1.3.82-beta
A small follow-up to 1.3.79-beta. The SA1504 code fix no longer drops
comments or blank lines when it expands accessors onto multiple lines.
The documentation's opening pages have also been reorganized. No
diagnostics change in this release.
## Fixes
* SA1504: preserve comments and blank lines in the multi-line fix by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4311
## Documentation
* Restructure the opening pages of our docs by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4309
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.79-beta...1.3.82-beta
## 1.3.79-beta
This release follows 1.3.18-beta with two new rules, a round of fixes
for long-standing false positives, and better code fixes. It also adds
Simplified Chinese resources and documentation. Thanks to @melomory for
contributing SA1317, their first contribution to the project.
## Highlights
- **Two new rules, both on by default.** SA1317 reports identifiers that
use letters outside basic Latin A–Z, which can hide look-alike
characters, and SA1653 reports partial types that have `<summary>`
documentation on more than one part.
([#3942](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3942),
[#4299](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4299))
- **Fewer false positives.** SA1501 now allows empty `catch` and
`finally` blocks, SA1118 allows multi-line tuple arguments, SA1629
accepts `!` and `?`, and SA1515 and SA1005 ignore tool marker comments
such as ReSharper, language injection and `NOSONAR`. SA1305 skips
`DllImport` parameters, and SA1402 and SA1649 accept supporting types in
files with top-level statements.
([#4290](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4290),
[#4284](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4284),
[#4298](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4298),
[#4302](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4302),
[#4297](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4297),
[#4306](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4306))
- **Better code fixes.** SA1201 Fix All finishes in one pass, the SA1503
fix respects custom indentation, the SA1003 fix keeps constructor
initializer line breaks, and the SA1402 fix removes unneeded usings from
the files it creates.
([#4277](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4277),
[#4294](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4294),
[#4280](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4280),
[#4307](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4307))
- **Localization.** This release adds Simplified Chinese (`zh-CN`)
resources and documentation, and finishes the Czech translations.
([#4285](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4285),
[#4286](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4286))
## Behavior changes worth knowing about
- **New rules:** SA1317 (Latin-only identifiers,
[#3942](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3942))
and SA1653 (only one partial part should have a `<summary>`,
[#4299](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4299))
are both enabled by default as warnings. Codebases with non-Latin
identifiers, or with summaries on several parts of a partial type, will
see new diagnostics.
- **SA1601** now requires documentation on only one part of a partial
type, matching how partial members already work.
([#4308](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4308))
- **SA1121** now reports on the built-in type inside a using alias
target instead of on every use of the alias, so a deliberate alias no
longer flags each usage.
([#4287](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4287))
- **SA1407** now checks bitwise operators (`&`, `|`, `^`) and `>>>`, so
mixed-precedence expressions using them get new diagnostics.
([#4289](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4289))
- **SA1633:** disabling one required-header rule, for example SA1637, no
longer turns off the other header checks, so those checks may now
report.
([#4276](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4276))
- **SA1202** treats explicit interface events as public, like other
explicit interface members.
([#4281](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4281))
- **SA1137** now aligns type members to their most common indentation
instead of to the first member.
([#4301](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4301))
- **Fewer diagnostics** from SA1501, SA1118, SA1629, SA1515/SA1005,
SA1305, SA1402/SA1649 and SA1642 (langword markup), as described above.
([#4290](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4290),
[#4284](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4284),
[#4298](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4298),
[#4302](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4302),
[#4297](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4297),
[#4306](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4306),
[#4282](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4282))
- **SA1625** has a new name and message that describe duplicate
documentation accurately. Its rule ID is unchanged.
([#4291](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4291))
## All changes
### Enhancements
* Implement a new rule SA1317 by @melomory in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3942
* SA1653: Detect conflicting summary documentation on partial types by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4299
* SA1121: report using alias targets by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4287
* SA1407: Cover bitwise and unsigned shift operators by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4289
* SA1201: fix all member ordering in one pass by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4277
* SA1402: Remove unused usings from extracted files by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4307
* SA1141: Use IOperation for expression analysis by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4292
* Add Simplified Chinese resources and documentation by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4285
* Translate remaining Czech documentation text by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4286
### Fixes
* SA1601: only require documentation on one part of a partial type by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4308
* SA1633: Keep other header checks active for optional headers by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4276
* SA1501: Allow empty catch and finally blocks by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4290
* SA1118: Allow multiline tuple arguments by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4284
* SA1629: accept exclamation and question marks by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4298
* SA1515: Exclude tool marker comments by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4302
* SA1305: Skip DllImport parameter names by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4297
* SA1402/SA1649: Handle files with top-level statements by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4306
* SA1202: Order explicit interface events as public by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4281
* SA1137: Choose common indentation for type members by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4301
* SA1642: Allow langword markup in constructor standard text by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4282
* SA1504: handle expression-bodied accessors by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4283
... (truncated)
## 1.3.18-beta
## What's Changed
* SA1134: exempt attributes on auto-property accessors by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4260
* fix: match qualified cref in SA1642 and SA1643 included docs by
@Akinori107 in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4263
* SA1202: allow dependent fields to vary from access ordering by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4261
* SA1134: fix code fix indentation on property accessors by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4262
* SA1003: handle postfix operators and null forgiveness by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4265
* SA1604: honor private documentation settings for excluded declarations
by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4274
* SA1100: avoid unsafe virtual dispatch fixes by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4273
* SA1137: align malformed array initializer brackets by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4272
* SA1203: preserve regions when reordering fields by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4269
* SA1114: Allow comment lines before parameter and argument lists by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4270
* SA1309: avoid out-variable name collisions by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4275
* SA1201: preserve conditional compilation boundaries by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4271
## New Contributors
* @Akinori107 made their first contribution in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4263
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.1-beta...1.3.18-beta
## 1.3.1-beta
This is the first StyleCop.Analyzers release since 1.2.0-beta.556, and
it's a big one. The project is active again: this release brings the
analyzers up to date with every C# version from 10 through the C# 15
previews, clears a long backlog of bugs, and modernizes how the project
is built, tested and shipped. Thank you to everyone who contributed
code, reviews, translations and bug reports over the long gap. Many of
the changes below started as community pull requests.
## Highlights
- **C# 8 through C# 15 language support.** Each language version was
audited rule by rule, and the rules now understand newer syntax instead
of ignoring it or crashing: records and record structs, file-scoped
namespaces, global usings, raw and interpolated strings, primary
constructors, collection expressions, partial properties, events and
constructors, `allows ref struct`, C# 14 extension blocks and the
`field` keyword, and C# 15 preview unions with the `closed` and `safe`
modifiers.
([#4142](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4142),
[#4139](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4139),
[#4137](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4137),
[#4163](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4163),
[#4148](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4148),
[#4191](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4191),
[#4193](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4193))
- **A large batch of bug fixes.** These cover false positives, crashes
and wrong code fixes across spacing, layout, documentation, naming and
maintainability rules. Several are long-standing issues.
([#4210](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4210),
[#3935](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3935),
[#4202](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4202),
[#4195](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4195),
[#4198](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4198),
[#3880](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3880))
- **Better code fixes.** Code fixes now keep the file's line endings,
keep comments in place, indent correctly when they add braces or move
arguments, and use the compiler's batch Fix All. There is also a new
SA1312 fix that turns underscore-only locals into discards, plus a
"Generate additional part" refactoring.
([#4076](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4076),
[#4199](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4199),
[#4108](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4108),
[#4229](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4229),
[#4208](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4208),
[#3705](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3705))
- **Faster analysis.** Settings are loaded faster, the spacing and
layout rules walk each syntax tree only once, and SA1141 was optimized.
([#3885](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3885),
[#4106](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4106),
[#3610](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3610))
- **Configuration and documentation.** Every setting can now be set in
`.editorconfig`, and the docs explain how that works alongside
`stylecop.json`. The documentation and rule status are published on
GitHub Pages, and there are more translations of the code-fix
documentation text (Czech, Dutch, Russian and others).
([#4221](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4221),
[#4218](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4218),
[#3374](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3374),
[#3944](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3944),
[#3900](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3900),
[#4220](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4220))
- **Packaging.** The NuGet packages now include a README, and PDBs are
embedded in the DLLs, so there is no separate symbols package. Packages
are published from GitHub Actions using nuget.org trusted publishing.
([#4204](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4204),
[#4173](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4173),
[#4123](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4123))
- **Modernized engineering.** CI moved to GitHub Actions and now runs on
Linux, the build uses the .NET 10 SDK, tests use xUnit v3, and Renovate
keeps dependencies current. The analyzers still target the same Roslyn
version, so they work with the same compilers and IDEs as before.
([#4105](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4105),
[#4126](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4126),
[#4225](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4225),
[#4226](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4226),
[#4253](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4253),
[#4231](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4231))
## Behavior changes worth knowing about
Upgrading may produce new or different diagnostics:
- **Rules now cover newer syntax.** Ordering, layout, spacing and
documentation rules now analyze records, primary constructors,
collection expressions, extension blocks, unions and other newer
constructs. They used to skip these, so expect new warnings in code that
uses them.
- **Extension members need documentation.** SA1600 no longer treats C#
14 extension blocks as private, so their public members must be
documented. SA1600 also reports undocumented record primary constructor
parameters.
([#4163](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4163),
[#4213](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4213))
- **Partial members.** For partial methods, properties, indexers,
constructors and events, SA1600 now leaves the check to SA1601.
Documenting one part is enough.
([#4148](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4148),
[#4149](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4149),
[#4152](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4152))
- **SA1316** now always reports explicitly written tuple element names,
even when `includeInferredTupleElementNames` is off. Names the compiler
infers are still checked only when that setting is on.
([#4202](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4202))
- **SA1312** no longer reports `_` for `foreach` variables and `using`
declarations.
([#4203](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4203))
- **SA1205** treats the `file` modifier as an access modifier.
([#4198](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4198))
- **SA1304** now analyzes `protected readonly` fields when SA1307 is
enabled.
([#4217](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4217))
- **SA1122** now reports empty interpolated and raw string literals, and
**SA1130** reports anonymous methods whose parameter names differ from
the delegate's. **SA1121** and **SA1125** report System types in using
alias targets.
([#4178](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4178),
[#4179](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4179),
[#4175](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4175))
- **SA1642** expects "union" wording, for example "Initializes a new
instance of the … union.", in constructor summaries of C# 15 union
types.
([#4193](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4193))
- **SA1600** respects the `documentInterfaces` setting values.
([#3140](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3140))
- **The default rule set is complete**, so rules that were missing from
it are now listed with their default severity.
([#4115](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4115))
- **Packaging:** the separate `.symbols.nupkg` is gone, because PDBs are
now embedded in the DLLs.
([#4173](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4173))
## All changes
<details>
<summary><b>Fixes</b> (52)</summary>
* Fix SA1504, SA1413, SA1402, SA1135, and blank lines above
documentation comments by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4210
* Fix SA1649 for C# 15 union declarations and C# 14 extension blocks by
@verdie-g in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4096,
completed by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4127
* Update SettingsHelper to not throw exception if the settings file can
not be read by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3935
* Update SA1404 to not crash when attribute uses a namespace alias by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3830
* Update SA1135UsingDirectivesMustBeQualified to not crash on a
UsingDirectiveSyntax without a Name by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3883
* Fix line ending handling by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4076
* SA1316: always check explicit element names in tuple expressions by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4202
* SA1205: treat the C# 11 file modifier as an access modifier by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4198
* SA1118: apply the multi-line argument exceptions to attribute
arguments by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4195
* SA1013: don't report a closing interpolation brace that starts a line
by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4196
* SA1629: accept a period followed by closing quotation marks by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4197
* Fix SA1611 not triggering on class primary constructors by
@SapiensAnatis in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3777
* SA1304: analyze protected readonly fields when SA1307 is enabled by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4217
* SA1649: match escaped identifiers to filenames by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4215
* SA1137: fix closing brace indentation when inline by @AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4216
* SA1008: allow whitespace before comments after opening parentheses by
@AArnott in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4214
... (truncated)
## 1.2.0-beta.556
## What's Changed
* Update SA1011 to forbid trailing space before the end of a switch case
by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3674
* Rewrite IOperationWrapper as a wrapper structure around IOperation by
@sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3611
* Update SA1202 to support interfaces (C# 8) and records (C# 9, 10) by
@sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3694
* Update documentation for SA1308 to also mention prefix "t_" by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3697
* Update SA1642 and its code fix to handle record structs correctly by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3696
* Update dependencies by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3700
* Mark several test classes as partial by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3702
* Add missing test files and fix inheritance by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3703
* Generate and validate derived test classes by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3704
* Update SA1011 to not require space before a range operator by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3709
* Update SA1131 to treat methods as constants by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3710
* Avoid allocations in CanWrap... methods by
@martin-strecker-sonarsource in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711
* Update SA1648 to accept inheritdoc on members implemented from static
abstract/virtual interface members by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3715
* Update SA1600 to also handle records by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3725
* Update SA1119 to allow parenthesis around a ref ternary conditional
expression when it is the left-hand side of an assigment by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3737
* Update SA1119 to allow parenthesized switch expressions followed by an
invocation by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3733
* Add c# 12 test project by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3734
* Run tests in parallel jobs by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3740
* Update SA1010 to accept whitespace before collection initializers by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3745
* Update SA1513 to not require a blank line if the closing brace is at
the end of a collection expression by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3746
* Update SA1118 to allow multi-line collection expressions by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3749
* Update SA1009 to require a space after the closing parenthesis if it
is followed by ++ or -- from a prefix unary expression by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3750
* Update SA1008 to allow space before the opening parenthesis of a using
alias definition of a tuple type by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3748
* Update documentation for SA1102 to contain compilable code examples by
@arphox in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755
* Update SA1008 to not crash if there is no previous token by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3741
* Change default value of test property CodeActionValidationMode to
SemanticStructure instead of None and update so that tests still pass by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3753
* Allow inheritdoc for class constructors with base types by @MartyIX
in https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719
* Fix that SA1134 Fix All maybe non-deterministic by @pdelvo in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/2853
* Coverage improvements by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3675
* Fix SA1131 to not treat "complex" expressions as a literal by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3760
## New Contributors
* @martin-strecker-sonarsource made their first contribution in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3711
* @arphox made their first contribution in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3755
* @MartyIX made their first contribution in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3719
**Full Changelog**:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.2.0-beta.507...1.2.0-beta.556
## 1.2.0-beta.507
## What's Changed
* Update to StyleCop.Analyzers 1.2.0-beta.435 by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3499
* Add c# 11 test project to opencover-report.ps1 by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3506
* Use GetText instead of ToFullString by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3514
* Keep tracked nodes in a list by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3525
* Remove unnecessary nullable directives by @sharwell in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3530
* Remove hard-coded language versions in test projects for c# 8, 9 and
10 by @bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3528
* Update SA1515 to not let one range of trivia affect another by
@bjornhellander in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3529
* Mentioned VS 2022 by @twojnarowski in
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3549
* Remove byte order mark from schema file by @martincostello in
https://github.com/DotNetAnaly…
Fixes #2354
Protected all similar methods in LocationHelpers against null reference exception.
I found one situation where this happens in SA1008 so I added a unit test for that as well.
I also went through all uses of the SyntaxTree properties in SyntaxToken, SyntaxTrivia and SyntaxNodeOrToken and tried to make sure that they could not cause a null reference exceptions.