Skip to content

Commit

Permalink
Merge pull request rubberduck-vba#2267 from ThunderFrame/next
Browse files Browse the repository at this point in the history
ignore functions returning arrays AND variable array assignments
  • Loading branch information
retailcoder committed Oct 1, 2016
2 parents 39273ba + 0b54772 commit 88f6127
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RetailCoder.VBE/Inspections/ObjectVariableNotSetInspection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public override IEnumerable<InspectionResultBase> GetInspectionResults()
var interestingDeclarations =
State.AllUserDeclarations.Where(item =>
!item.IsSelfAssigned &&
!item.IsArray &&
!ValueTypes.Contains(item.AsTypeName) &&
(item.AsTypeDeclaration == null ||
item.AsTypeDeclaration.DeclarationType != DeclarationType.Enumeration &&
Expand All @@ -99,6 +100,7 @@ public override IEnumerable<InspectionResultBase> GetInspectionResults()
var interestingMembers =
State.AllUserDeclarations.Where(item =>
(item.DeclarationType == DeclarationType.Function || item.DeclarationType == DeclarationType.PropertyGet)
&& !item.IsArray
&& item.IsTypeSpecified
&& !ValueTypes.Contains(item.AsTypeName));

Expand Down

0 comments on commit 88f6127

Please sign in to comment.