File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Rubberduck.CodeAnalysis/Inspections/Concrete Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,12 @@ public UnderscoreInPublicClassModuleMemberInspection(RubberduckParserState state
15
15
16
16
protected override IEnumerable < IInspectionResult > DoGetInspectionResults ( )
17
17
{
18
+ var interfaceMembers = State . DeclarationFinder . FindAllInterfaceImplementingMembers ( ) . ToList ( ) ;
19
+ var eventHandlers = State . DeclarationFinder . FindEventHandlers ( ) . ToList ( ) ;
20
+
18
21
var names = State . DeclarationFinder . UserDeclarations ( Parsing . Symbols . DeclarationType . Member )
19
22
. Where ( w => w . ParentDeclaration . DeclarationType == Parsing . Symbols . DeclarationType . ClassModule )
20
- . Where ( w => ! State . DeclarationFinder . FindAllInterfaceImplementingMembers ( ) . Contains ( w ) )
23
+ . Where ( w => ! interfaceMembers . Contains ( w ) && ! eventHandlers . Contains ( w ) )
21
24
. Where ( w => w . Accessibility == Parsing . Symbols . Accessibility . Public || w . Accessibility == Parsing . Symbols . Accessibility . Implicit )
22
25
. Where ( w => w . IdentifierName . Contains ( '_' ) )
23
26
. ToList ( ) ;
You can’t perform that action at this time.
0 commit comments