Skip to content

Commit 6843bdf

Browse files
committed
Close #1029
1 parent f060914 commit 6843bdf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

RetailCoder.VBE/Inspections/UseMeaningfulNameInspection.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22
using System.Linq;
3+
using Rubberduck.Parsing.Symbols;
34
using Rubberduck.Parsing.VBA;
45
using Rubberduck.UI;
56
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
@@ -25,9 +26,10 @@ public UseMeaningfulNameInspection(IMessageBox messageBox, RubberduckParserState
2526
public override IEnumerable<CodeInspectionResultBase> GetInspectionResults()
2627
{
2728
var issues = UserDeclarations
28-
.Where(declaration => declaration.IdentifierName.Length < 3 ||
29+
.Where(declaration => declaration.DeclarationType != DeclarationType.ModuleOption &&
30+
(declaration.IdentifierName.Length < 3 ||
2931
char.IsDigit(declaration.IdentifierName.Last()) ||
30-
!declaration.IdentifierName.Any(c => new[] {'a', 'e', 'i', 'o', 'u', 'y'}.Contains(c)))
32+
!declaration.IdentifierName.Any(c => new[] {'a', 'e', 'i', 'o', 'u', 'y'}.Contains(c))))
3133
.Select(issue => new UseMeaningfulNameInspectionResult(this, issue, State, _wrapperFactory, _messageBox))
3234
.ToList();
3335

0 commit comments

Comments
 (0)