Skip to content

Commit 05531bf

Browse files
author
Kapil Borle
committed
Derive ProvideCommentHelp class from ConfigurableRule
1 parent 9351878 commit 05531bf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Rules/ProvideCommentHelp.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
3030
#if !CORECLR
3131
[Export(typeof(IScriptRule))]
3232
#endif
33-
public class ProvideCommentHelp : IScriptRule
33+
public class ProvideCommentHelp : ConfigurableRule
3434
{
3535

3636
/// <summary>
@@ -39,7 +39,7 @@ public class ProvideCommentHelp : IScriptRule
3939
/// <param name="ast">The script's ast</param>
4040
/// <param name="fileName">The name of the script</param>
4141
/// <returns>A List of diagnostic results of this rule</returns>
42-
public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
42+
public override IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
4343
{
4444
if (ast == null) throw new ArgumentNullException(Strings.NullAstErrorMessage);
4545

@@ -63,7 +63,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
6363
/// GetName: Retrieves the name of this rule.
6464
/// </summary>
6565
/// <returns>The name of this rule</returns>
66-
public string GetName()
66+
public override string GetName()
6767
{
6868
return string.Format(CultureInfo.CurrentCulture, Strings.NameSpaceFormat, GetSourceName(), Strings.ProvideCommentHelpName);
6969
}
@@ -72,7 +72,7 @@ public string GetName()
7272
/// GetCommonName: Retrieves the common name of this rule.
7373
/// </summary>
7474
/// <returns>The common name of this rule</returns>
75-
public string GetCommonName()
75+
public override string GetCommonName()
7676
{
7777
return string.Format(CultureInfo.CurrentCulture, Strings.ProvideCommentHelpCommonName);
7878
}
@@ -81,15 +81,15 @@ public string GetCommonName()
8181
/// GetDescription: Retrieves the description of this rule.
8282
/// </summary>
8383
/// <returns>The description of this rule</returns>
84-
public string GetDescription()
84+
public override string GetDescription()
8585
{
8686
return string.Format(CultureInfo.CurrentCulture, Strings.ProvideCommentHelpDescription);
8787
}
8888

8989
/// <summary>
9090
/// Method: Retrieves the type of the rule: builtin, managed or module.
9191
/// </summary>
92-
public SourceType GetSourceType()
92+
public override SourceType GetSourceType()
9393
{
9494
return SourceType.Builtin;
9595
}
@@ -98,15 +98,15 @@ public SourceType GetSourceType()
9898
/// GetSeverity: Retrieves the severity of the rule: error, warning of information.
9999
/// </summary>
100100
/// <returns></returns>
101-
public RuleSeverity GetSeverity()
101+
public override RuleSeverity GetSeverity()
102102
{
103103
return RuleSeverity.Information;
104104
}
105105

106106
/// <summary>
107107
/// Method: Retrieves the module/assembly name the rule is from.
108108
/// </summary>
109-
public string GetSourceName()
109+
public override string GetSourceName()
110110
{
111111
return string.Format(CultureInfo.CurrentCulture, Strings.SourceName);
112112
}

0 commit comments

Comments
 (0)