Skip to content

Commit 118fd40

Browse files
committed
Implement Ignore-Behaviour for AssignmentNotUsed inspection, fix #4812
1 parent 5d4cfdb commit 118fd40

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Rubberduck.CodeAnalysis/Inspections/Concrete/AssignmentNotUsedInspection.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ protected override IEnumerable<IInspectionResult> DoGetInspectionResults()
4646
}
4747

4848
return nodes
49+
.Where(issue => !issue.IsIgnoringInspectionResultFor(AnnotationName)
50+
// Ignoring the Declaration disqualifies all assignments
51+
&& !IsIgnoringInspectionResultFor(issue.Declaration, AnnotationName))
4952
.Select(issue => new IdentifierReferenceInspectionResult(this, Description, State, issue))
5053
.ToList();
5154
}

0 commit comments

Comments
 (0)