Skip to content

Commit 7d2c70f

Browse files
Shayde NofzigerShayde Nofziger
authored andcommitted
Updated Tests and help text.
1 parent f6b918d commit 7d2c70f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Engine/about_PSScriptAnalyzer.help.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ RUNNING SCRIPT ANALYZER ON AN EXISTING SCRIPT, MODULE OR DSC RESOURCE
134134
Count Name
135135
----- ----
136136
23 PSAvoidUsingInvokeExpression
137-
8 PSUseDeclaredVarsMoreThanAssigments
137+
8 PSUseDeclaredVarsMoreThanAssignments
138138
8 PSProvideDefaultParameterValue
139139
6 PSAvoidUninitializedVariable
140140
3 PSPossibleIncorrectComparisonWithNull
141141
1 PSAvoidUsingComputerNameHardcoded
142142

143143
You may decide to exclude the PSAvoidUsingInvokeExpression rule for the moment
144-
and focus on the rest, especially the PSUseDeclaredVarsMoreThanAssigments,
144+
and focus on the rest, especially the PSUseDeclaredVarsMoreThanAssignments,
145145
PSAvoidUninitializedVariable and PSPossibleIncorrectComparisonWithNull rules.
146146

147147
As you fix rules, go back and enable more rules as you have time to address

Tests/Rules/UseDeclaredVarsMoreThanAssignments.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Import-Module PSScriptAnalyzer
22
$violationMessage = "The variable 'declaredVar2' is assigned but never used."
3-
$violationName = "PSUseDeclaredVarsMoreThanAssigments"
3+
$violationName = "PSUseDeclaredVarsMoreThanAssignments"
44
$directory = Split-Path -Parent $MyInvocation.MyCommand.Path
55
$violations = Invoke-ScriptAnalyzer $directory\UseDeclaredVarsMoreThanAssignments.ps1 | Where-Object {$_.RuleName -eq $violationName}
66
$noViolations = Invoke-ScriptAnalyzer $directory\UseDeclaredVarsMoreThanAssignmentsNoViolations.ps1 | Where-Object {$_.RuleName -eq $violationName}

0 commit comments

Comments
 (0)