Skip to content

Commit 4eb0543

Browse files
committed
Address review
1 parent 70b53ca commit 4eb0543

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

Rubberduck.CodeAnalysis/Inspections/Concrete/UnderscoreInPublicClassModuleMemberInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected override IEnumerable<IInspectionResult> DoGetInspectionResults()
1818
var names = State.DeclarationFinder.UserDeclarations(Parsing.Symbols.DeclarationType.Member)
1919
.Where(w => w.ParentDeclaration.DeclarationType == Parsing.Symbols.DeclarationType.ClassModule)
2020
.Where(w => !State.DeclarationFinder.FindAllInterfaceImplementingMembers().Contains(w))
21-
.Where(w => w.Accessibility == Parsing.Symbols.Accessibility.Public)
21+
.Where(w => w.Accessibility == Parsing.Symbols.Accessibility.Public || w.Accessibility == Parsing.Symbols.Accessibility.Implicit)
2222
.Where(w => w.IdentifierName.Contains('_'))
2323
.ToList();
2424

Rubberduck.Resources/Inspections/InspectionInfo.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rubberduck.Resources/Inspections/InspectionInfo.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,6 @@ If the parameter can be null, ignore this inspection result; passing a null valu
350350
<value>An assignment is immediately overridden by another assignment or is never referenced.</value>
351351
</data>
352352
<data name="UnderscoreInPublicClassModuleMemberInspection" xml:space="preserve">
353-
<value>A class module with public members with underscores cannot implement interfaces that do not expose said member.</value>
353+
<value>A class module that contains members with underscores cannot be implemented by other classes. The underscore is used as a separator between the interface/object name and the implemented member name: having an underscore in the member name confuses the compiler, which then refuses to compile the project. Avoid underscores in public member names by following a 'PascalCase' naming convention.</value>
354354
</data>
355355
</root>

Rubberduck.Resources/Inspections/InspectionResults.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rubberduck.Resources/Inspections/InspectionResults.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,6 @@
379379
<value>An assignment is immediately overridden by another assignment or is never referenced.</value>
380380
</data>
381381
<data name="UnderscoreInPublicClassModuleMemberInspection" xml:space="preserve">
382-
<value>Public member '{0}' has underscore in name.</value>
382+
<value>Public member name '{0}' contains an underscore.</value>
383383
</data>
384384
</root>

RubberduckTests/Inspections/UnderscoreInPublicClassModuleMemberInspectionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public void Implicit_WithUnderscore()
132132
var inspector = InspectionsHelper.GetInspector(inspection);
133133
var inspectionResults = inspector.FindIssuesAsync(state, CancellationToken.None).Result;
134134

135-
Assert.AreEqual(0, inspectionResults.Count());
135+
Assert.AreEqual(1, inspectionResults.Count());
136136
}
137137
}
138138

0 commit comments

Comments
 (0)