Skip to content

Commit af2b026

Browse files
committed
Make all concrete inspection listeners private
1 parent 6a17bf7 commit af2b026

32 files changed

+100
-97
lines changed

Rubberduck.CodeAnalysis/Inspections/Abstract/DeclarationInspectionBaseBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
namespace Rubberduck.Inspections.Abstract
1010
{
11+
/// <summary>
12+
/// This is a base class for the other declaration inspection base classes. It should not be implemented directly by concrete inspections.
13+
/// </summary>
1114
public abstract class DeclarationInspectionBaseBase : InspectionBase
1215
{
1316
private readonly DeclarationType[] _relevantDeclarationTypes;

Rubberduck.CodeAnalysis/Inspections/Concrete/BooleanAssignedInIfElseInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected override string ResultDescription(QualifiedContext<VBAParser.IfStmtCon
5959
literalText);
6060
}
6161

62-
public class BooleanAssignedInIfElseListener : InspectionListenerBase<VBAParser.IfStmtContext>
62+
private class BooleanAssignedInIfElseListener : InspectionListenerBase<VBAParser.IfStmtContext>
6363
{
6464
public override void ExitIfStmt(VBAParser.IfStmtContext context)
6565
{

Rubberduck.CodeAnalysis/Inspections/Concrete/DefTypeStatementInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private string GetTypeOfDefType(string defType)
6868
{ "DefVar", "Variant" }
6969
};
7070

71-
public class DefTypeStatementInspectionListener : InspectionListenerBase<VBAParser.DefTypeContext>
71+
private class DefTypeStatementInspectionListener : InspectionListenerBase<VBAParser.DefTypeContext>
7272
{
7373
public override void ExitDefType([NotNull] VBAParser.DefTypeContext context)
7474
{

Rubberduck.CodeAnalysis/Inspections/Concrete/EmptyBlockInspectionListenerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Rubberduck.Inspections.Concrete
99
{
10-
public class EmptyBlockInspectionListenerBase<TContext> : InspectionListenerBase<TContext>
10+
internal class EmptyBlockInspectionListenerBase<TContext> : InspectionListenerBase<TContext>
1111
where TContext : ParserRuleContext
1212
{
1313
public void InspectBlockForExecutableStatements<T>(VBAParser.BlockContext block, T context) where T : TContext

Rubberduck.CodeAnalysis/Inspections/Concrete/EmptyCaseBlockInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected override string ResultDescription(QualifiedContext<VBAParser.CaseClaus
5555
return InspectionResults.EmptyCaseBlockInspection;
5656
}
5757

58-
public class EmptyCaseBlockListener : EmptyBlockInspectionListenerBase<VBAParser.CaseClauseContext>
58+
private class EmptyCaseBlockListener : EmptyBlockInspectionListenerBase<VBAParser.CaseClauseContext>
5959
{
6060
public override void EnterCaseClause([NotNull] VBAParser.CaseClauseContext context)
6161
{

Rubberduck.CodeAnalysis/Inspections/Concrete/EmptyDoWhileBlockInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected override string ResultDescription(QualifiedContext<VBAParser.DoLoopStm
5050
return InspectionResults.EmptyDoWhileBlockInspection;
5151
}
5252

53-
public class EmptyDoWhileBlockListener : EmptyBlockInspectionListenerBase<VBAParser.DoLoopStmtContext>
53+
private class EmptyDoWhileBlockListener : EmptyBlockInspectionListenerBase<VBAParser.DoLoopStmtContext>
5454
{
5555
public override void EnterDoLoopStmt([NotNull] VBAParser.DoLoopStmtContext context)
5656
{

Rubberduck.CodeAnalysis/Inspections/Concrete/EmptyElseBlockInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected override string ResultDescription(QualifiedContext<VBAParser.ElseBlock
5252
return InspectionResults.EmptyElseBlockInspection;
5353
}
5454

55-
public class EmptyElseBlockListener : EmptyBlockInspectionListenerBase<VBAParser.ElseBlockContext>
55+
private class EmptyElseBlockListener : EmptyBlockInspectionListenerBase<VBAParser.ElseBlockContext>
5656
{
5757
public override void EnterElseBlock([NotNull] VBAParser.ElseBlockContext context)
5858
{

Rubberduck.CodeAnalysis/Inspections/Concrete/EmptyForEachBlockInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected override string ResultDescription(QualifiedContext<VBAParser.ForEachSt
5252
return InspectionResults.EmptyForEachBlockInspection;
5353
}
5454

55-
public class EmptyForEachBlockListener : EmptyBlockInspectionListenerBase<VBAParser.ForEachStmtContext>
55+
private class EmptyForEachBlockListener : EmptyBlockInspectionListenerBase<VBAParser.ForEachStmtContext>
5656
{
5757
public override void EnterForEachStmt([NotNull] VBAParser.ForEachStmtContext context)
5858
{

Rubberduck.CodeAnalysis/Inspections/Concrete/EmptyForLoopBlockInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected override string ResultDescription(QualifiedContext<VBAParser.ForNextSt
5252
return InspectionResults.EmptyForLoopBlockInspection;
5353
}
5454

55-
public class EmptyForLoopBlockListener : EmptyBlockInspectionListenerBase<VBAParser.ForNextStmtContext>
55+
private class EmptyForLoopBlockListener : EmptyBlockInspectionListenerBase<VBAParser.ForNextStmtContext>
5656
{
5757
public override void EnterForNextStmt([NotNull] VBAParser.ForNextStmtContext context)
5858
{

Rubberduck.CodeAnalysis/Inspections/Concrete/EmptyIfBlockInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected override string ResultDescription(QualifiedContext<ParserRuleContext>
4949

5050
protected override IInspectionListener<ParserRuleContext> ContextListener { get; }
5151

52-
public class EmptyIfBlockListener : EmptyBlockInspectionListenerBase<ParserRuleContext>
52+
private class EmptyIfBlockListener : EmptyBlockInspectionListenerBase<ParserRuleContext>
5353
{
5454
public override void EnterIfStmt([NotNull] VBAParser.IfStmtContext context)
5555
{

0 commit comments

Comments
 (0)