Skip to content

Commit 08bb657

Browse files
committed
Merge pull request #1839 from sharwell/fix-1827
Enable SA1133 by default
2 parents f1bf53b + 6025919 commit 08bb657

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1503UnitTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ protected override CodeFixProvider GetCSharpCodeFixProvider()
410410
/// <param name="statementText">The source code for the first part of a compound statement whose child can be
411411
/// either a statement block or a single statement.</param>
412412
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
413-
[Theory, MemberData(nameof(TestStatements))]
413+
[Theory]
414+
[MemberData(nameof(TestStatements))]
414415
private async Task TestCodeFixForStatementAsync(string statementText)
415416
{
416417
await this.VerifyCSharpFixAsync(this.GenerateTestStatement(statementText), this.GenerateFixedTestStatement(statementText)).ConfigureAwait(false);

StyleCop.Analyzers/StyleCop.Analyzers.ruleset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<Rule Id="SA1119" Action="Error" />
8787
<Rule Id="SA1121" Action="Error" />
8888
<Rule Id="SA1122" Action="Error" />
89+
<Rule Id="SA1133" Action="Error" />
8990
<Rule Id="SA1300" Action="Error" />
9091
<Rule Id="SA1302" Action="Error" />
9192
<Rule Id="SA1303" Action="Error" />

StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1133DoNotCombineAttributes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal class SA1133DoNotCombineAttributes : DiagnosticAnalyzer
2626
private static readonly string HelpLink = "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1133.md";
2727

2828
private static readonly DiagnosticDescriptor Descriptor =
29-
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.ReadabilityRules, DiagnosticSeverity.Warning, AnalyzerConstants.DisabledNoTests, Description, HelpLink);
29+
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.ReadabilityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);
3030

3131
private static readonly Action<CompilationStartAnalysisContext> CompilationStartAction = HandleCompilationStart;
3232
private static readonly Action<SyntaxNodeAnalysisContext> HandleAttributeListAction = HandleAttributeList;

0 commit comments

Comments
 (0)