You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$nonInitializedMessage="Variable 'a' is not initialized. Non-global variables must be initialized. To fix a violation of this rule, please initialize non-global variables."
5
+
$nonInitializedMessage="Variable 'globalVars' is not initialized. Non-global variables must be initialized. To fix a violation of this rule, please initialize non-global variables."
Copy file name to clipboardExpand all lines: Tests/Rules/AvoidPositionalParameters.tests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
Import-Module PSScriptAnalyzer
2
-
$violationMessage="Cmdlet 'Get-Content' has positional parameter. Please use named parameters instead of positional parameters when calling a command."
2
+
$violationMessage="Cmdlet 'Write-Host' has positional parameter. Please use named parameters instead of positional parameters when calling a command."
Copy file name to clipboardExpand all lines: Tests/Rules/AvoidShouldContinueWithoutForce.tests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
Import-Module PSScriptAnalyzer
2
-
$violationMessage="Function 'Verb-Noun' in file 'AvoidShouldContinueWithoutForce.ps1' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt"
2
+
$violationMessage="Function 'Verb-Noun2' in file 'AvoidShouldContinueWithoutForce.ps1' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt"
Copy file name to clipboardExpand all lines: Tests/Rules/AvoidUsingAlias.tests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
Import-Module PSScriptAnalyzer
2
-
$violationMessage="'iex' is an alias of 'Invoke-Expression'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content."
2
+
$violationMessage="'cls' is an alias of 'Clear-Host'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content."
Copy file name to clipboardExpand all lines: Tests/Rules/AvoidUsingPlainTextForPassword.tests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Import-Module PSScriptAnalyzer
2
2
3
-
$violationMessage= [regex]::Escape("Parameter '`$passphrases' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information.")
3
+
$violationMessage= [regex]::Escape("Parameter '`$password' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information.")
$violationMessage="Variable 'MyProgressPreference' is not initialized. Non-global variables must be initialized. To fix a violation of this rule, please initialize non-global variables."
3
+
$violationMessage="Variable 'MyVerbosePreference' is not initialized. Non-global variables must be initialized. To fix a violation of this rule, please initialize non-global variables."
Copy file name to clipboardExpand all lines: Tests/Rules/ProvideDefaultParameterValue.tests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Import-Module PSScriptAnalyzer
2
2
$violationName="PSProvideDefaultParameterValue"
3
-
$violationMessage="Parameter 'Param2' is not initialized. Parameters must have a default value. To fix a violation of this rule, please specify a default value for all parameters"
3
+
$violationMessage="Parameter 'Param1' is not initialized. Parameters must have a default value. To fix a violation of this rule, please specify a default value for all parameters"
Copy file name to clipboardExpand all lines: Tests/Rules/ReturnCorrectTypesForDSCFunctions.tests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Import-Module-Verbose PSScriptAnalyzer
2
2
3
3
$violationMessageDSCResource="Test-TargetResource function in DSC Resource should return object of type System.Boolean instead of System.Collections.Hashtable"
4
-
$violationMessageDSCClass="Test function in DSC Class FileResource should return object of type System.Boolean instead of type System.Int32"
4
+
$violationMessageDSCClass="Get function in DSC Class FileResource should return object of type FileResource instead of type System.Collections.Hashtable"
Copy file name to clipboardExpand all lines: Tests/Rules/UseOutputTypeCorrectly.tests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
Import-Module PSScriptAnalyzer
2
-
$violationMessage="The cmdlet 'Verb-Files' returns an object of type 'System.Double' but this type is not declared in the OutputType attribute."
2
+
$violationMessage="The cmdlet 'Verb-Files' returns an object of type 'System.Collections.Hashtable' but this type is not declared in the OutputType attribute."
Copy file name to clipboardExpand all lines: Tests/Rules/UseVerboseMessageInDSCResource.Tests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Import-Module PSScriptAnalyzer
2
2
3
-
$violationMessage="There is no call to Write-Verbose in DSC function ‘Set-TargetResource’. If you are using Write-Verbose in a helper function, suppress this rule application."
3
+
$violationMessage="There is no call to Write-Verbose in DSC function ‘Test-TargetResource’. If you are using Write-Verbose in a helper function, suppress this rule application."
0 commit comments