File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
13
13
// and keep it internal as it consumed only by a handful of rules.
14
14
public abstract class ConfigurableScriptRule : IScriptRule
15
15
{
16
+ // Configurable rules should define a default value
17
+ // because if reading the configuration fails
18
+ // we use the property's default value
16
19
[ ConfigurableRuleProperty ( ) ]
17
20
public bool Enable { get ; protected set ; } = false ;
18
21
19
- public bool IsRuleConfigured { get ; protected set ; } = false ;
20
-
21
22
public virtual void ConfigureRule ( )
22
23
{
24
+ // TODO Do not use Helper. Pass this method a dictionary instead
23
25
var arguments = Helper . Instance . GetRuleArguments ( this . GetName ( ) ) ;
24
26
try
25
27
{
@@ -42,8 +44,6 @@ public virtual void ConfigureRule()
42
44
// but we know that this should not crash the program hence we
43
45
// have this empty catch block
44
46
}
45
-
46
- IsRuleConfigured = true ;
47
47
}
48
48
49
49
private IEnumerable < PropertyInfo > GetConfigurableProperties ( )
You can’t perform that action at this time.
0 commit comments