Skip to content

Commit fcf292e

Browse files
committed
Implement CR feedback
1 parent 3332660 commit fcf292e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/ReadabilityRules/SA1133CodeFixProvider.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ private static async Task<Document> GetTransformedDocumentAsync(Document documen
5757
{
5858
attributeList = (AttributeListSyntax)nodeInSourceSpan.Parent;
5959
}
60-
else
60+
else if (nodeInSourceSpan.Parent is AttributeSyntax)
6161
{
6262
var violatingAttribute = (AttributeSyntax)nodeInSourceSpan.Parent;
6363
attributeList = (AttributeListSyntax)violatingAttribute.Parent;
6464
}
65+
else
66+
{
67+
return document;
68+
}
6569

6670
var newAttributeLists = new List<AttributeListSyntax>();
6771

0 commit comments

Comments
 (0)