Skip to content

Commit 80b6edf

Browse files
authored
feat: configure SA1141 and SA1142 (#2)
* feat: add SA1141 and SA1142 * feat: remove workaround for RS1022
1 parent 11cb99d commit 80b6edf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Cnblogs.CodeQuality.ruleset

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@
6868
<Rule Id="CA2241" Action="Warning"/>
6969
<Rule Id="CA2242" Action="Warning"/>
7070
</Rules>
71-
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Analyzers">
72-
<Rule Id="RS1022" Action="None"/> <!-- https://github.com/dotnet/roslyn-analyzers/issues/1803 -->
73-
</Rules>
7471
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.CodeStyle" RuleNamespace="Microsoft.CodeAnalysis.CSharp.CodeStyle">
7572
<Rule Id="IDE0055" Action="Warning"/>
7673
</Rules>
@@ -81,6 +78,7 @@
8178
<Rule Id="SA0001" Action="Hidden"/> <!-- XML comment analysis disabled -->
8279
<Rule Id="SA0002" Action="Warning"/> <!-- Invalid settings file -->
8380
</Rules>
81+
8482
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.SpacingRules">
8583
<Rule Id="SA1000" Action="Warning"/> <!-- Keywords should be spaced correctly -->
8684
<Rule Id="SA1001" Action="Error"/> <!-- Commas should be spaced correctly -->
@@ -152,6 +150,8 @@
152150
<Rule Id="SA1136" Action="Warning"/> <!-- Enum values should be on separate lines -->
153151
<Rule Id="SA1137" Action="Warning"/> <!-- Elements should have the same indentation -->
154152
<Rule Id="SA1139" Action="Warning"/> <!-- Use literal suffix notation instead of casting -->
153+
<Rule Id="SA1141" Action="Warning" /> <!-- Use tuple syntax -->
154+
<Rule Id="SA1142" Action="Info" /> <!-- Refer to tuple fields by name -->
155155
<Rule Id="SX1101" Action="None"/> <!-- Do not prefix local calls with 'this.' -->
156156
</Rules>
157157

@@ -293,6 +293,7 @@
293293
<Rule Id="SA1650" Action="None"/> <!-- Element documentation should be spelled correctly -->
294294
<Rule Id="SA1651" Action="Warning"/> <!-- Do not use placeholder elements -->
295295
</Rules>
296+
296297
<Rules AnalyzerId="DocumentationAnalyzers" RuleNamespace="DocumentationAnalyzers">
297298
<Rule Id="DOC100" Action="Warning"/>
298299
<Rule Id="DOC101" Action="Warning"/>
@@ -309,6 +310,7 @@
309310
<Rule Id="DOC203" Action="Warning"/>
310311
<Rule Id="DOC204" Action="Warning"/>
311312
</Rules>
313+
312314
<Rules AnalyzerId="xunit.analyzers" RuleNamespace="xunit.analyzers">
313315
<Rule Id="xUnit1013" Action="Error"/>
314316
</Rules>

0 commit comments

Comments
 (0)