Skip to content

Commit 7a59b5c

Browse files
committed
Return distinct results for unassigned usages. Ref #3636
1 parent c6863a7 commit 7a59b5c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Rubberduck.CodeAnalysis/Inspections/Concrete/UnassignedVariableUsageInspection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ protected override IEnumerable<IInspectionResult> DoGetInspectionResults()
3939
return declarations.Except(excludedDeclarations)
4040
.Where(d => d.References.Any())
4141
.SelectMany(d => d.References)
42+
.Distinct()
4243
.Where(r => !r.IsIgnoringInspectionResultFor(AnnotationName))
4344
.Select(r => new IdentifierReferenceInspectionResult(this,
4445
string.Format(InspectionResults.UnassignedVariableUsageInspection, r.IdentifierName),

0 commit comments

Comments
 (0)