Skip to content

Commit fc3e272

Browse files
author
Kapil Borle
committed
Run code formatting rules only if enabled
This runs rule derived from configurablescriptrule class only if its "Enable" property is set to true.
1 parent 86bfae9 commit fc3e272

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Engine/ScriptAnalyzer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,8 @@ bool IsRuleAllowed(IRule rule)
17041704

17051705
return (includeRule == null || includeRegexMatch)
17061706
&& (excludeRule == null || !excludeRegexMatch)
1707-
&& IsSeverityAllowed(allowedSeverities, rule);
1707+
&& IsSeverityAllowed(allowedSeverities, rule)
1708+
&& IsRuleEnabled(rule);
17081709
}
17091710

17101711
/// <summary>

0 commit comments

Comments
 (0)