Skip to content

Commit 9acf387

Browse files
pedrocodacybergmeister
authored andcommitted
Add summary comment to some rules with short description (#1087)
* Add summary comment to some rules with short description * correct typo * add period * add period
1 parent 1eb9a01 commit 9acf387

11 files changed

+18
-9
lines changed

Rules/AlignAssignmentStatement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1515
{
1616
/// <summary>
17-
/// A class to walk an AST to check if consecutive assignment statements are aligned.
17+
/// AlignAssignmentStatement: Checks if consecutive assignment statements are aligned.
1818
/// </summary>
1919
#if !CORECLR
2020
[Export(typeof(IScriptRule))]

Rules/AvoidAssignmentToAutomaticVariable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1515
{
1616
/// <summary>
17-
/// AvoidAssignmentToAutomaticVariable:
17+
/// AvoidAssignmentToAutomaticVariable: Checks for assignment to automatic variables.
1818
/// </summary>
1919
#if !CORECLR
2020
[Export(typeof(IScriptRule))]

Rules/AvoidGlobalAliases.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1515
{
16+
/// <summary>
17+
/// AvoidGlobalAliases: Checks that global aliases are not used.
18+
/// </summary>
1619
#if !CORECLR
1720
[Export(typeof(IScriptRule))]
1821
#endif

Rules/AvoidGlobalFunctions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1414
{
15+
/// <summary>
16+
/// AvoidGlobalFunctions: Checks that global functions are not used within modules.
17+
/// </summary>
1518
#if !CORECLR
1619
[Export(typeof(IScriptRule))]
1720
#endif

Rules/AvoidTrailingWhitespace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1515
{
1616
/// <summary>
17-
/// A class to walk an AST to check for violation.
17+
/// AvoidTrailingWhitespace: Checks for trailing whitespaces
1818
/// </summary>
1919
#if !CORECLR
2020
[Export(typeof(IScriptRule))]

Rules/PlaceCloseBrace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1515
{
1616
/// <summary>
17-
/// A class to walk an AST to check for violation.
17+
/// PlaceCloseBrace: Indicates if there should or should not be an empty line before a close brace.
1818
/// </summary>
1919
#if !CORECLR
2020
[Export(typeof(IScriptRule))]

Rules/UseCompatibleCmdlets.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1919
{
2020
/// <summary>
21-
/// A class to check if a script uses Cmdlets compatible with a given version and edition of PowerShell.
21+
/// UseCompatibleCmdlets: Checks if a script uses Cmdlets compatible with a given version and edition of PowerShell.
2222
/// </summary>
2323
#if !CORECLR
2424
[Export(typeof(IScriptRule))]
2525
#endif
26+
/// <summary>
27+
/// A class to check if a script uses Cmdlets compatible with a given version and edition of PowerShell.
28+
/// </summary>
2629
public class UseCompatibleCmdlets : AstVisitor, IScriptRule
2730
{
2831
private struct RuleParameters

Rules/UseConsistentIndentation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1515
{
1616
/// <summary>
17-
/// A class to walk an AST to check for violation.
17+
/// UseConsistentIndentation: Checks if indentation is consistent throughout the source file.
1818
/// </summary>
1919
#if !CORECLR
2020
[Export(typeof(IScriptRule))]

Rules/UseConsistentWhitespace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1616
{
1717
/// <summary>
18-
/// A class to walk an AST to check for [violation]
18+
/// UseConsistentWhitespace: Checks if whitespace usage is consistent throughout the source file.
1919
/// </summary>
2020
#if !CORECLR
2121
[Export(typeof(IScriptRule))]

Rules/UseLiteralInitializerForHashtable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1616
{
1717
/// <summary>
18-
/// A class to walk an AST to check if hashtable is not initialized using [hashtable]::new or new-object hashtable
18+
/// UseLiteralInitializerForHashtable: Checks if hashtable is not initialized using [hashtable]::new or new-object hashtable.
1919
/// </summary>
2020
#if !CORECLR
2121
[Export(typeof(IScriptRule))]

Rules/UseSupportsShouldProcess.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
1616
{
1717
/// <summary>
18-
/// A class to that implements the UseSupportsShouldProcess rule.
18+
/// UseSupportsShouldProcess: Checks if a function defines Confirm and/or WhatIf parameters manually instead of using SupportsShouldProcess attribute.
1919
/// </summary>
2020
#if !CORECLR
2121
[Export(typeof(IScriptRule))]

0 commit comments

Comments
 (0)