File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ internal enum PreferenceVariable
160
160
internal const string PSEmailServer = "PSEmailServer" ;
161
161
internal const string PSDefaultParameterValues = "PSDefaultParameterValues" ;
162
162
internal const string PSModuleAutoLoadingPreference = "PSModuleAutoLoadingPreference" ;
163
+ internal const string PSNativeCommandArgumentPassing = "PSNativeCommandArgumentPassing" ;
163
164
internal const string pwd = "PWD" ;
164
165
internal const string Null = "null" ;
165
166
internal const string True = "true" ;
@@ -182,6 +183,7 @@ internal enum PreferenceVariable
182
183
PSEmailServer ,
183
184
PSDefaultParameterValues ,
184
185
PSModuleAutoLoadingPreference ,
186
+ PSNativeCommandArgumentPassing ,
185
187
pwd ,
186
188
Null ,
187
189
True ,
Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ function MyFunc2() {
58
58
Should - Be 0
59
59
}
60
60
61
+ It " does not flag `$ PSNativeCommandArgumentPassing variable" {
62
+ Invoke-ScriptAnalyzer - ScriptDefinition ' $PSNativeCommandArgumentPassing=None' - IncludeRule $violationName | `
63
+ Get-Count | `
64
+ Should - Be 0
65
+ }
66
+
61
67
It " does not flag global variable" {
62
68
Invoke-ScriptAnalyzer - ScriptDefinition ' $global:x=$null' - IncludeRule $violationName | `
63
69
Get-Count | `
You can’t perform that action at this time.
0 commit comments