Skip to content

Commit 1e2be1e

Browse files
committed
Update ScriptRuleDocumentation.md
Update PowerShell capitalization.
1 parent 36cb31f commit 1e2be1e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ScriptRuleDocumentation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This documentation serves as a basic guideline on how to define customized rules
2020

2121
- Output type should be DiagnosticRecord:
2222
```
23-
[OutputType([Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.DiagnosticRecord[]])]
23+
[OutputType([Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord[]])]
2424
```
2525

2626
- Make sure each function takes either a Token or an Ast as a parameter
@@ -36,7 +36,7 @@ Param
3636

3737
- DiagnosticRecord should have four properties: Message, Extent, RuleName and Severity
3838
```
39-
$result = [Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.DiagnosticRecord[]]@{"Message" = "This is a sample rule";
39+
$result = [Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord[]]@{"Message" = "This is a sample rule";
4040
"Extent" = $ast.Extent;
4141
"RuleName" = $PSCmdlet.MyInvocation.InvocationName;
4242
"Severity" = "Warning"}
@@ -62,14 +62,14 @@ Export-ModuleMember -Function (FunctionName)
6262
.INPUTS
6363
[System.Management.Automation.Language.ScriptBlockAst]
6464
.OUTPUTS
65-
[Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.DiagnosticRecord[]]
65+
[Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord[]]
6666
.NOTES
6767
None
6868
#>
6969
function Measure-RequiresRunAsAdministrator
7070
{
7171
[CmdletBinding()]
72-
[OutputType([Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.DiagnosticRecord[]])]
72+
[OutputType([Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord[]])]
7373
Param
7474
(
7575
[Parameter(Mandatory = $true)]
@@ -127,7 +127,7 @@ function Measure-RequiresRunAsAdministrator
127127
if ((!$ScriptBlockAst.ScriptRequirements.IsElevationRequired) -and
128128
($methodAst.Count -ne 0) -and ($assignmentAst.Count -ne 0))
129129
{
130-
$result = [Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.DiagnosticRecord]@{"Message" = $Messages.MeasureRequiresRunAsAdministrator;
130+
$result = [Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord]@{"Message" = $Messages.MeasureRequiresRunAsAdministrator;
131131
"Extent" = $assignmentAst.Extent;
132132
"RuleName" = $PSCmdlet.MyInvocation.InvocationName;
133133
"Severity" = "Information"}
@@ -138,7 +138,7 @@ function Measure-RequiresRunAsAdministrator
138138
{
139139
if (($methodAst.Count -ne 0) -and ($assignmentAst.Count -ne 0))
140140
{
141-
$result = [Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.DiagnosticRecord]@{"Message" = $Messages.MeasureRequiresRunAsAdministrator;
141+
$result = [Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord]@{"Message" = $Messages.MeasureRequiresRunAsAdministrator;
142142
"Extent" = $assignmentAst.Extent;
143143
"RuleName" = $PSCmdlet.MyInvocation.InvocationName;
144144
"Severity" = "Information"}

0 commit comments

Comments
 (0)