Skip to content

Commit a0fe12c

Browse files
author
Kapil Borle
committed
Remove redundant rule configuration
We already configure the rule when initializing ScriptAnalyzer. Hence, configuring them within their respective AnalyzeAst methods is redundant.
1 parent 34a4fea commit a0fe12c

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

Rules/PlaceCloseBrace.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ public override IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string file
4444
throw new ArgumentNullException("ast");
4545
}
4646

47-
if (!IsRuleConfigured)
48-
{
49-
ConfigureRule();
50-
}
51-
5247
if (!Enable)
5348
{
5449
return Enumerable.Empty<DiagnosticRecord>();

Rules/PlaceOpenBrace.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,7 @@ public override IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string file
5151
throw new ArgumentNullException("ast");
5252
}
5353

54-
if (!IsRuleConfigured)
55-
{
56-
ConfigureRule();
57-
}
58-
5954
var diagnosticRecords = new List<DiagnosticRecord>();
60-
6155
if (Enable)
6256
{
6357
foreach (var violationFinder in violationFinders)

Rules/UseConsistentIndentation.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ public override IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string file
4949
throw new ArgumentNullException("ast");
5050
}
5151

52-
if (!IsRuleConfigured)
53-
{
54-
ConfigureRule();
55-
}
56-
5752
// we add this switch because there is no clean way
5853
// to disable the rule by default
5954
if (!Enable)

0 commit comments

Comments
 (0)