Underscore in Public Class Module Member

Warns about public class members with an underscore in their names.

 NEW! This inspection is only available in pre-release builds.

Reasoning

The public interface of any class module can be implemented by any other class module; if the public interface contains names with underscores, other classes cannot implement it - the code will not compile. Avoid underscores; prefer PascalCase names.

Default severity

Warning

Inspection type

CodeQualityIssues

QuickFixes

The following quickfixes are available for this inspection:

Examples

This example should trigger a result

MyModule (ClassModule)
'@Interface Public Sub Do_Something() ' underscore in name makes the interface non-implementable. End Sub

This example should NOT trigger a result

MyModule (ClassModule)
'@Interface Public Sub DoSomething() ' PascalCase identifiers are never a problem. End Sub

Rubberduck.CodeAnalysis.Inspections.Concrete.UnderscoreInPublicClassModuleMemberInspection.cs (Prerelease-v2.5.2.6174)