We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 718d4b8 + 665f847 commit 22d7bb8Copy full SHA for 22d7bb8
2 files changed
Engine/SpecialVars.cs
@@ -140,6 +140,7 @@ internal enum PreferenceVariable
140
Confirm = 14,
141
}
142
143
+ internal const string Host = "Host";
144
internal const string HistorySize = "MaximumHistoryCount";
145
internal const string OutputEncoding = "OutputEncoding";
146
internal const string NestedPromptLevel = "NestedPromptLevel";
@@ -159,6 +160,7 @@ internal enum PreferenceVariable
159
160
161
internal static readonly string[] OtherInitializedVariables = new string[]
162
{
163
+ Host,
164
HistorySize,
165
OutputEncoding,
166
NestedPromptLevel,
Tests/Rules/AvoidGlobalOrUnitializedVarsNoViolations.ps1
@@ -9,6 +9,9 @@ function Test {
9
10
$a = 3;
11
12
+#should not raise error
13
+$Host
14
+
15
"hi there!" -match "hi" | Out-Null;
16
$matches[0];
17
0 commit comments