Skip to content

Commit

Permalink
Add summary comment to some rules with short description (#1087)
Browse files Browse the repository at this point in the history
* Add summary comment to some rules with short description

* correct typo

* add period

* add period
  • Loading branch information
pedrocodacy authored and bergmeister committed Oct 29, 2018
1 parent 1eb9a01 commit 9acf387
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Rules/AlignAssignmentStatement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// A class to walk an AST to check if consecutive assignment statements are aligned.
/// AlignAssignmentStatement: Checks if consecutive assignment statements are aligned.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
Expand Down
2 changes: 1 addition & 1 deletion Rules/AvoidAssignmentToAutomaticVariable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// AvoidAssignmentToAutomaticVariable:
/// AvoidAssignmentToAutomaticVariable: Checks for assignment to automatic variables.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
Expand Down
3 changes: 3 additions & 0 deletions Rules/AvoidGlobalAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// AvoidGlobalAliases: Checks that global aliases are not used.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
#endif
Expand Down
3 changes: 3 additions & 0 deletions Rules/AvoidGlobalFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// AvoidGlobalFunctions: Checks that global functions are not used within modules.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
#endif
Expand Down
2 changes: 1 addition & 1 deletion Rules/AvoidTrailingWhitespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// A class to walk an AST to check for violation.
/// AvoidTrailingWhitespace: Checks for trailing whitespaces
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
Expand Down
2 changes: 1 addition & 1 deletion Rules/PlaceCloseBrace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// A class to walk an AST to check for violation.
/// PlaceCloseBrace: Indicates if there should or should not be an empty line before a close brace.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
Expand Down
5 changes: 4 additions & 1 deletion Rules/UseCompatibleCmdlets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// A class to check if a script uses Cmdlets compatible with a given version and edition of PowerShell.
/// UseCompatibleCmdlets: Checks if a script uses Cmdlets compatible with a given version and edition of PowerShell.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
#endif
/// <summary>
/// A class to check if a script uses Cmdlets compatible with a given version and edition of PowerShell.
/// </summary>
public class UseCompatibleCmdlets : AstVisitor, IScriptRule
{
private struct RuleParameters
Expand Down
2 changes: 1 addition & 1 deletion Rules/UseConsistentIndentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// A class to walk an AST to check for violation.
/// UseConsistentIndentation: Checks if indentation is consistent throughout the source file.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
Expand Down
2 changes: 1 addition & 1 deletion Rules/UseConsistentWhitespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// A class to walk an AST to check for [violation]
/// UseConsistentWhitespace: Checks if whitespace usage is consistent throughout the source file.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
Expand Down
2 changes: 1 addition & 1 deletion Rules/UseLiteralInitializerForHashtable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// A class to walk an AST to check if hashtable is not initialized using [hashtable]::new or new-object hashtable
/// UseLiteralInitializerForHashtable: Checks if hashtable is not initialized using [hashtable]::new or new-object hashtable.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
Expand Down
2 changes: 1 addition & 1 deletion Rules/UseSupportsShouldProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// A class to that implements the UseSupportsShouldProcess rule.
/// UseSupportsShouldProcess: Checks if a function defines Confirm and/or WhatIf parameters manually instead of using SupportsShouldProcess attribute.
/// </summary>
#if !CORECLR
[Export(typeof(IScriptRule))]
Expand Down

0 comments on commit 9acf387

Please sign in to comment.