Skip to content

Commit 56bfdbb

Browse files
committed
Disable some inspections instead of do-not-showing them.
1 parent 3d74b97 commit 56bfdbb

16 files changed

+32
-19
lines changed

Retailcoder.VBE/UI/RubberduckUI.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,8 +2052,8 @@ Would you like to import them to Rubberduck?</value>
20522052
<value>Method '{0}' is an implementation of event '{1}.{2}'. Rename event '{2}' instead?</value>
20532053
<comment>0: Selected target Identifier; 1: Event Parent; 2: Event name</comment>
20542054
</data>
2055-
<data name="GeneralSettings_EnableSourceControl" xml:space="preserve">
2056-
<value>Enable Source Control. Requires a restart to take effect.</value>
2055+
<data name="GeneralSettings_EnableExperimentalFeatures" xml:space="preserve">
2056+
<value>Enable experimental features. Requires a restart to take effect.</value>
20572057
</data>
20582058
<data name="GeneralSettings_ExperimentalFeaturesWarning" xml:space="preserve">
20592059
<value>Only enable these if you know what you're doing. Enabling and/or using features from this section may result in things breaking unexpectedly and irrevocable data loss.</value>

Rubberduck.Inspections/Concrete/EmptyCaseBlockInspection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Antlr4.Runtime.Misc;
22
using Rubberduck.Inspections.Abstract;
33
using Rubberduck.Inspections.Results;
4+
using Rubberduck.Parsing.Common;
45
using Rubberduck.Parsing.Grammar;
56
using Rubberduck.Parsing.Inspections.Abstract;
67
using Rubberduck.Parsing.Inspections.Resources;
@@ -10,10 +11,11 @@
1011

1112
namespace Rubberduck.Inspections.Concrete
1213
{
14+
[Experimental]
1315
internal class EmptyCaseBlockInspection : ParseTreeInspectionBase
1416
{
1517
public EmptyCaseBlockInspection(RubberduckParserState state)
16-
: base(state, CodeInspectionSeverity.DoNotShow) { }
18+
: base(state, CodeInspectionSeverity.Warning) { }
1719

1820
public override IInspectionListener Listener { get; } =
1921
new EmptyCaseBlockListener();

Rubberduck.Inspections/Concrete/EmptyDoWhileBlockInspection.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Antlr4.Runtime.Misc;
22
using Rubberduck.Inspections.Abstract;
33
using Rubberduck.Inspections.Results;
4+
using Rubberduck.Parsing.Common;
45
using Rubberduck.Parsing.Grammar;
56
using Rubberduck.Parsing.Inspections.Abstract;
67
using Rubberduck.Parsing.Inspections.Resources;
@@ -10,6 +11,7 @@
1011

1112
namespace Rubberduck.Inspections.Concrete
1213
{
14+
[Experimental]
1315
internal class EmptyDoWhileBlockInspection : ParseTreeInspectionBase
1416
{
1517
public EmptyDoWhileBlockInspection(RubberduckParserState state)

Rubberduck.Inspections/Concrete/EmptyElseBlockInspection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Antlr4.Runtime.Misc;
22
using Rubberduck.Inspections.Abstract;
33
using Rubberduck.Inspections.Results;
4+
using Rubberduck.Parsing.Common;
45
using Rubberduck.Parsing.Grammar;
56
using Rubberduck.Parsing.Inspections.Abstract;
67
using Rubberduck.Parsing.Inspections.Resources;
@@ -10,10 +11,11 @@
1011

1112
namespace Rubberduck.Inspections.Concrete
1213
{
14+
[Experimental]
1315
internal class EmptyElseBlockInspection : ParseTreeInspectionBase
1416
{
1517
public EmptyElseBlockInspection(RubberduckParserState state)
16-
: base(state, CodeInspectionSeverity.DoNotShow) { }
18+
: base(state, CodeInspectionSeverity.Warning) { }
1719

1820
public override CodeInspectionType InspectionType => CodeInspectionType.MaintainabilityAndReadabilityIssues;
1921

Rubberduck.Inspections/Concrete/EmptyForEachBlockInspection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Antlr4.Runtime.Misc;
22
using Rubberduck.Inspections.Abstract;
33
using Rubberduck.Inspections.Results;
4+
using Rubberduck.Parsing.Common;
45
using Rubberduck.Parsing.Grammar;
56
using Rubberduck.Parsing.Inspections.Abstract;
67
using Rubberduck.Parsing.Inspections.Resources;
@@ -10,10 +11,11 @@
1011

1112
namespace Rubberduck.Inspections.Concrete
1213
{
14+
[Experimental]
1315
internal class EmptyForEachBlockInspection : ParseTreeInspectionBase
1416
{
1517
public EmptyForEachBlockInspection(RubberduckParserState state)
16-
: base(state, CodeInspectionSeverity.DoNotShow) { }
18+
: base(state, CodeInspectionSeverity.Warning) { }
1719

1820
public override CodeInspectionType InspectionType => CodeInspectionType.MaintainabilityAndReadabilityIssues;
1921

Rubberduck.Inspections/Concrete/EmptyForLoopBlockInspection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Antlr4.Runtime.Misc;
22
using Rubberduck.Inspections.Abstract;
33
using Rubberduck.Inspections.Results;
4+
using Rubberduck.Parsing.Common;
45
using Rubberduck.Parsing.Grammar;
56
using Rubberduck.Parsing.Inspections.Abstract;
67
using Rubberduck.Parsing.Inspections.Resources;
@@ -10,10 +11,11 @@
1011

1112
namespace Rubberduck.Inspections.Concrete
1213
{
14+
[Experimental]
1315
internal class EmptyForLoopBlockInspection : ParseTreeInspectionBase
1416
{
1517
public EmptyForLoopBlockInspection(RubberduckParserState state)
16-
: base(state, CodeInspectionSeverity.DoNotShow) { }
18+
: base(state, CodeInspectionSeverity.Warning) { }
1719

1820
public override CodeInspectionType InspectionType => CodeInspectionType.MaintainabilityAndReadabilityIssues;
1921

Rubberduck.Inspections/Concrete/EmptyIfBlockInspection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Rubberduck.Inspections.Abstract;
44
using Rubberduck.Inspections.Results;
55
using Rubberduck.Parsing;
6+
using Rubberduck.Parsing.Common;
67
using Rubberduck.Parsing.Grammar;
78
using Rubberduck.Parsing.Inspections.Abstract;
89
using Rubberduck.Parsing.Inspections.Resources;
@@ -12,10 +13,11 @@
1213

1314
namespace Rubberduck.Inspections.Concrete
1415
{
16+
[Experimental]
1517
internal class EmptyIfBlockInspection : ParseTreeInspectionBase
1618
{
1719
public EmptyIfBlockInspection(RubberduckParserState state)
18-
: base(state, CodeInspectionSeverity.DoNotShow) { }
20+
: base(state, CodeInspectionSeverity.Warning) { }
1921

2022
public override CodeInspectionType InspectionType => CodeInspectionType.MaintainabilityAndReadabilityIssues;
2123

Rubberduck.Inspections/Concrete/EmptyWhileWendBlockInspection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Antlr4.Runtime.Misc;
22
using Rubberduck.Inspections.Abstract;
33
using Rubberduck.Inspections.Results;
4+
using Rubberduck.Parsing.Common;
45
using Rubberduck.Parsing.Grammar;
56
using Rubberduck.Parsing.Inspections.Abstract;
67
using Rubberduck.Parsing.Inspections.Resources;
@@ -10,10 +11,11 @@
1011

1112
namespace Rubberduck.Inspections.Concrete
1213
{
14+
[Experimental]
1315
internal class EmptyWhileWendBlockInspection : ParseTreeInspectionBase
1416
{
1517
public EmptyWhileWendBlockInspection(RubberduckParserState state)
16-
: base(state, CodeInspectionSeverity.DoNotShow) { }
18+
: base(state, CodeInspectionSeverity.Warning) { }
1719

1820
public override CodeInspectionType InspectionType => CodeInspectionType.MaintainabilityAndReadabilityIssues;
1921

RubberduckTests/Inspections/EmptyCaseBlockInspectionTests.cs

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

88
namespace RubberduckTests.Inspections
99
{
10-
[TestClass, Ignore]
10+
[TestClass]
1111
public class EmptyCaseBlockInspectionTests
1212
{
1313
[TestMethod]

RubberduckTests/Inspections/EmptyElseBlockInspectionTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace RubberduckTests.Inspections
99
{
10-
[TestClass, Ignore]
10+
[TestClass]
1111
public class EmptyElseBlockInspectionTests
1212
{
1313
[TestMethod]
@@ -57,7 +57,7 @@ If True Then
5757
public void EmptyElseBlock_HasNoContent()
5858
{
5959
const string inputcode =
60-
@"Sub Foo()
60+
@"Sub Foo()
6161
If True Then
6262
Else
6363
End If
@@ -66,7 +66,6 @@ End If
6666
var vbe = MockVbeBuilder.BuildFromSingleStandardModule(inputcode, out _);
6767
using (var state = MockParser.CreateAndParse(vbe.Object))
6868
{
69-
7069
var inspection = new EmptyElseBlockInspection(state);
7170
var inspector = InspectionsHelper.GetInspector(inspection);
7271
var actualResults = inspector.FindIssuesAsync(state, CancellationToken.None).Result;

0 commit comments

Comments
 (0)