Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspection for non-Private Event Handlers and/or implemented Interface Members #2271

Open
ThunderFrame opened this issue Oct 3, 2016 · 2 comments
Labels
enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections

Comments

@ThunderFrame
Copy link
Member

Event Handlers and Implemented Interface members are typically created as Private, but it is possible to declare these members as Friend of Public, which makes those members callable procedures by any consumer of the class.

Rubberduck should warn of such members declared as anything other than explicitly Private.

Implements IFoo
Private WithEvents App As Application

Public Class_Initialize() ' Eeek, it's public, how many times can we initialize?
End Sub

Friend Sub App_AfterCalculate() 'Do we really want to make the AfterCalculate event-handler callable at any time?
End Sub

Public IFoo_Bar() 'Bar is callable against the IFoo interface, but also directly via the class as `IFoo_Bar`
End Sub
@ThunderFrame ThunderFrame added enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections labels Oct 3, 2016
@retailcoder
Copy link
Member

I want this one to ship for next release.... badly. It's way overdue and plaguing way too much VBA code out there.

@Hosch250
Copy link
Member

You'd better hurry up with the inspections refactoring, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections
Projects
None yet
Development

No branches or pull requests

3 participants