Skip to content

Commit 6df1d7c

Browse files
author
Kapil Borle
committed
Remove IsRuleConfigured property
1 parent a0fe12c commit 6df1d7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Engine/Generic/ConfigurableScriptRule.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
1313
// and keep it internal as it consumed only by a handful of rules.
1414
public abstract class ConfigurableScriptRule : IScriptRule
1515
{
16+
// Configurable rules should define a default value
17+
// because if reading the configuration fails
18+
// we use the property's default value
1619
[ConfigurableRuleProperty()]
1720
public bool Enable { get; protected set; } = false;
1821

19-
public bool IsRuleConfigured { get; protected set; } = false;
20-
2122
public virtual void ConfigureRule()
2223
{
24+
// TODO Do not use Helper. Pass this method a dictionary instead
2325
var arguments = Helper.Instance.GetRuleArguments(this.GetName());
2426
try
2527
{
@@ -42,8 +44,6 @@ public virtual void ConfigureRule()
4244
// but we know that this should not crash the program hence we
4345
// have this empty catch block
4446
}
45-
46-
IsRuleConfigured = true;
4747
}
4848

4949
private IEnumerable<PropertyInfo> GetConfigurableProperties()

0 commit comments

Comments
 (0)