We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3332660 commit fcf292eCopy full SHA for fcf292e
1 file changed
StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/ReadabilityRules/SA1133CodeFixProvider.cs
@@ -57,11 +57,15 @@ private static async Task<Document> GetTransformedDocumentAsync(Document documen
57
{
58
attributeList = (AttributeListSyntax)nodeInSourceSpan.Parent;
59
}
60
- else
+ else if (nodeInSourceSpan.Parent is AttributeSyntax)
61
62
var violatingAttribute = (AttributeSyntax)nodeInSourceSpan.Parent;
63
attributeList = (AttributeListSyntax)violatingAttribute.Parent;
64
65
+ else
66
+ {
67
+ return document;
68
+ }
69
70
var newAttributeLists = new List<AttributeListSyntax>();
71
0 commit comments