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
PowerShell classes requires variables to be initialized in a method before reference. This causes issues with global variables without scoping as the parser will throw a Variable is not assigned in the method error. To get around this the variable must be scoped but this causes PSScriptAnalyzer to throw a violation. The rule should only trigger when assigning a variable to the global scope not reading.
PowerShell classes requires variables to be initialized in a method before reference. This causes issues with global variables without scoping as the parser will throw a
Variable is not assigned in the method
error. To get around this the variable must be scoped but this causes PSScriptAnalyzer to throw a violation. The rule should only trigger when assigning a variable to the global scope not reading.Steps to reproduce
Expected behavior
No warnings
Actual behavior
If an unexpected error was thrown then please report the full error details using e.g.
$error[0] | Select-Object *
Environment data
The text was updated successfully, but these errors were encountered: