Skip to content

Commit e9050d8

Browse files
committed
Used DeclarationType.ModuleOption to replace string op
1 parent b43d1a6 commit e9050d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Rubberduck.Parsing/Symbols/DeclarationFinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ private bool IsPublicInOtherModule(Declaration candidateDeclaration, Declaration
786786
&& (candidateDeclaration.Accessibility == Accessibility.Public
787787
|| (candidateDeclaration.Accessibility == Accessibility.Implicit)
788788
&& (candidateDeclaration.ParentScopeDeclaration is ProceduralModuleDeclaration)
789-
&& !candidateDeclaration.IdentifierName.StartsWith("Option "));
789+
&& !(candidateDeclaration.DeclarationType == DeclarationType.ModuleOption));
790790
}
791791

792792
private bool IsDeclaredWithinMethodOrProperty(RuleContext procedureContextCandidate)

RubberduckTests/Symbols/DeclarationFinderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private void SetupSUT(string projectName)
141141

142142
string[] accessibleWithinParentProcedure = { "arg1", "FooBar1", "targetAccessibilityTests", "theSecondArg" };
143143
string[] accessibleModuleScope = { "memberString", "memberLong", "myEggo", "Foo", "FooBar1", "GoMyEggo", "FooFight" };
144-
string[] accessibleGlobalScope = { "CantTouchThis", "BigNumber", "DoSomething", "SetFilename", "ShortStory","THE_FILENAME" };
144+
string[] accessibleGlobalScope = { "CantTouchThis", "BigNumber", "DoSomething", "SetFilename", "ShortStory","THE_FILENAME"};
145145

146146
_accessibilityTests_ProcedureScopeNames = accessibleWithinParentProcedure.ToList();
147147
_accessibilityTests_ModuleScopeNames = accessibleModuleScope.ToList();

0 commit comments

Comments
 (0)