- Notifications
You must be signed in to change notification settings - Fork 316
ImplicitPublicMemberInspection
Description: Member is implicitly public
Type: CodeInspectionType.MaintainabilityAndReadabilityIssues
Default severity: CodeInspectionSeverity.Suggestion
This inspection finds procedure members (Sub, Function and Property) that are implicitly public.
Function GetFoo is implicitly public:
Function GetFoo() As Variant End Function If an access modifier isn't specified, a procedure member is Public by default. In other languages (including VB.NET), members are Private by default; for better maintainability, it's better to specify access modifiers explicitly.
QuickFix: Specify Public access modifier explicitly
Public Function GetFoo() As Variant End Function By explicitly specifying the access modifier, there is no need for the maintainer to remember VBA's specific member visibility rules, which enhances readability and maintainability.
rubberduckvba.com
© 2014-2025 Rubberduck project contributors
- Contributing
- Build process
- Version bump
- Architecture Overview
- IoC Container
- Parser State
- The Parsing Process
- How to view parse tree
- UI Design Guidelines
- Strategies for managing COM object lifetime and release
- COM Registration
- Internal Codebase Analysis
- Projects & Workflow
- Adding other Host Applications
- Inspections XML-Doc
-
VBE Events