Skip to content

Commit 18678a3

Browse files
committed
Correct Engine tests for PSProvideDefaultParameterValue
1 parent ead2e6f commit 18678a3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Tests/Engine/InvokeScriptAnalyzer.tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ Describe "Test IncludeRule" {
136136
Context "IncludeRule supports wild card" {
137137
It "includes 1 wildcard rule"{
138138
$includeWildcard = Invoke-ScriptAnalyzer $directory\..\Rules\BadCmdlet.ps1 -IncludeRule $avoidRules
139-
$includeWildcard.Count | Should be 5
139+
$includeWildcard.Count | Should be 3
140140
}
141141

142142
it "includes 2 wildcardrules" {
143143
$includeWildcard = Invoke-ScriptAnalyzer $directory\..\Rules\BadCmdlet.ps1 -IncludeRule $avoidRules, $useRules
144-
$includeWildcard.Count | Should be 9
144+
$includeWildcard.Count | Should be 7
145145
}
146146
}
147147
}

Tests/Engine/RuleSuppression.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Param(
66
function SuppressMe ()
77
{
88
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSProvideVerboseMessage")]
9-
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUninitializedVariable", "unused1")]
9+
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSProvideDefaultParameterValue", "unused1")]
1010
Param([string]$unUsed1, [int] $unUsed2)
1111
{
1212
Write-Host "I do nothing"

Tests/Engine/RuleSuppression.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Describe "RuleSuppressionWithoutScope" {
3333

3434
Context "RuleSuppressionID" {
3535
It "Only suppress violations for that ID" {
36-
$suppression = $violations | Where-Object {$_.RuleName -eq "PSAvoidUninitializedVariable" }
36+
$suppression = $violations | Where-Object {$_.RuleName -eq "PSProvideDefaultParameterValue" }
3737
$suppression.Count | Should Be 1
3838
}
3939
}

0 commit comments

Comments
 (0)