Skip to content

Add summary comment to some rules with short description #1087

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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