Skip to content

Commit

Permalink
only look at self assigned variable declarations (fixes rubberduck-vb…
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrin Meier committed Feb 9, 2016
1 parent 6c063af commit 7e64a7f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using Rubberduck.Parsing.VBA;
using Rubberduck.Parsing.Symbols;

namespace Rubberduck.Inspections
{
Expand All @@ -18,7 +19,7 @@ public SelfAssignedDeclarationInspection(RubberduckParserState state)
public override IEnumerable<CodeInspectionResultBase> GetInspectionResults()
{
return UserDeclarations
.Where(declaration => declaration.IsSelfAssigned)
.Where(declaration => declaration.IsSelfAssigned && declaration.DeclarationType == DeclarationType.Variable)
.Select(issue => new SelfAssignedDeclarationInspectionResult(this, issue));
}
}
Expand Down

0 comments on commit 7e64a7f

Please sign in to comment.