Skip to content

Commit e6be9df

Browse files
committed
Merge pull request #1575 from sharwell/fix-1557
2 parents 0d753f9 + 30da651 commit e6be9df

2 files changed

Lines changed: 1 addition & 33 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1111UnitTests.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,19 +1139,9 @@ public async Task TestAttributeListLastParameterOnThePreviousLineAsClosingBracke
11391139
]
11401140
public class FooAttribute : System.Attribute
11411141
{
1142-
}";
1143-
var fixedCode = @"
1144-
using System.Diagnostics;
1145-
[Conditional(""DEBUG""), Conditional(""TEST1"")]
1146-
public class FooAttribute : System.Attribute
1147-
{
11481142
}";
11491143

1150-
DiagnosticResult expected = this.CSharpDiagnostic().WithLocation(4, 1);
1151-
1152-
await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
1153-
await this.VerifyCSharpDiagnosticAsync(fixedCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
1154-
await this.VerifyCSharpFixAsync(testCode, fixedCode, cancellationToken: CancellationToken.None).ConfigureAwait(false);
1144+
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
11551145
}
11561146

11571147
[Fact]

StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1111ClosingParenthesisMustBeOnLineOfLastParameter.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ private static void HandleCompilationStart(CompilationStartAnalysisContext conte
7979
context.RegisterSyntaxNodeActionHonorExclusions(HandleDelegateDeclarationExpression, SyntaxKind.DelegateDeclaration);
8080
context.RegisterSyntaxNodeActionHonorExclusions(HandleAttribute, SyntaxKind.Attribute);
8181
context.RegisterSyntaxNodeActionHonorExclusions(HandleAnonymousMethod, SyntaxKind.AnonymousMethodExpression);
82-
context.RegisterSyntaxNodeActionHonorExclusions(HandleAttributeList, SyntaxKind.AttributeList);
8382
context.RegisterSyntaxNodeActionHonorExclusions(HandleParenthesizedLambdaExpression, SyntaxKind.ParenthesizedLambdaExpression);
8483
context.RegisterSyntaxNodeActionHonorExclusions(HandleArrayCreation, SyntaxKind.ArrayCreationExpression);
8584
}
@@ -137,27 +136,6 @@ private static void HandleParenthesizedLambdaExpression(SyntaxNodeAnalysisContex
137136
}
138137
}
139138

140-
private static void HandleAttributeList(SyntaxNodeAnalysisContext context)
141-
{
142-
var attributeList = (AttributeListSyntax)context.Node;
143-
144-
if (!attributeList.Attributes.Any())
145-
{
146-
return;
147-
}
148-
149-
var lastAttribute = attributeList.Attributes
150-
.Last();
151-
152-
if (!attributeList.CloseBracketToken.IsMissing && lastAttribute.ArgumentList != null)
153-
{
154-
CheckIfLocationOfLastArgumentOrParameterAndCloseTokenAreTheSame(
155-
context,
156-
lastAttribute,
157-
attributeList.CloseBracketToken);
158-
}
159-
}
160-
161139
private static void HandleAnonymousMethod(SyntaxNodeAnalysisContext context)
162140
{
163141
var anonymousMethod = (AnonymousMethodExpressionSyntax)context.Node;

0 commit comments

Comments
 (0)