Skip to content

Commit 0b6dece

Browse files
author
Kapil Borle
committed
Merge pull request #327 from kapilmb/FixDocInconsistencies
Fixes documentation inconsistencies for some rules.
2 parents af3e4b1 + ce36fb4 commit 0b6dece

7 files changed

+13
-7
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#UseBOMForUnicodeEncodedFile
2+
**Severity Level: Warning**
3+
4+
##Description
5+
6+
For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly.

Rules/UseBOMForUnicodeEncodedFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
2424
{
2525
/// <summary>
26-
/// AvoidAlias: Check if help file uses utf8 encoding
26+
/// UseBOMForUnicodeEncodedFile: Checks if a file with missing BOM is ASCII encoded.
2727
/// </summary>
2828
[Export(typeof(IScriptRule))]
2929
public class UseBOMForUnicodeEncodedFile : IScriptRule

Rules/UseDeclaredVarsMoreThanAssignments.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
2121
{
2222
/// <summary>
23-
/// ExtraVarsRule: Analyzes the ast to check that variables are used in more than just their assignment.
23+
/// UseDeclaredVarsMoreThanAssigments: Analyzes the ast to check that variables are used in more than just their assignment.
2424
/// </summary>
2525
[Export(typeof(IScriptRule))]
2626
public class UseDeclaredVarsMoreThanAssigments : IScriptRule

Rules/UseOutputTypeCorrectly.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
2323
{
2424
/// <summary>
25-
/// ProvideCommentHelp: Checks that objects return in a cmdlet have their types declared in OutputType Attribute
25+
/// UseOutputTypeCorrectly: Checks that objects returned in a cmdlet have their types declared in OutputType Attribute.
2626
/// </summary>
2727
[Export(typeof(IScriptRule))]
2828
public class UseOutputTypeCorrectly : SkipTypeDefinition, IScriptRule
2929
{
3030
private IEnumerable<TypeDefinitionAst> _classes;
3131

3232
/// <summary>
33-
/// AnalyzeScript: Checks that objects return in a cmdlet have their types declared in OutputType Attribute
33+
/// AnalyzeScript: Checks that objects returned in a cmdlet have their types declared in OutputType Attribute
3434
/// </summary>
3535
/// <param name="ast">The script's ast</param>
3636
/// <param name="fileName">The name of the script</param>

Rules/UseShouldProcessForStateChangingFunctions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
2323
{/// <summary>
24-
/// UseShouldProcessCorrectly: Analyzes the ast to check that if the ShouldProcess attribute is present, the function calls ShouldProcess and vice versa.
24+
/// UseShouldProcessForStateChangingFunctions: Analyzes the ast to check if ShouldProcess is included in Advanced functions if the Verb of the function could change system state.
2525
/// </summary>
2626
[Export(typeof(IScriptRule))]
2727
public class UseShouldProcessForStateChangingFunctions : IScriptRule

Rules/UseStandardDSCFunctionsInResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
2222
{
2323
/// <summary>
24-
/// UseStandardDSCFunctionsInResource:
24+
/// UseStandardDSCFunctionsInResource: Checks if the DSC resource uses standard Get/Set/Test TargetResource functions.
2525
/// </summary>
2626
[Export(typeof(IDSCResourceRule))]
2727
public class UseStandardDSCFunctionsInResource : IDSCResourceRule

Rules/UseVerboseMessageInDSCResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
2323
{
2424
/// <summary>
25-
/// ProvideVerboseMessage: Analyzes the ast to check that Write-Verbose is called for DSC Resources
25+
/// UseVerboseMessageInDSCResource: Analyzes the ast to check that Write-Verbose is called for DSC Resources.
2626
/// </summary>
2727
[Export(typeof(IDSCResourceRule))]
2828
public class UseVerboseMessageInDSCResource : SkipNamedBlock, IDSCResourceRule

0 commit comments

Comments
 (0)