We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'foo' | ForEach-Object { $guy = 'bar' }; $guy
Zero problem. Scope issue should be expected with Invoke-Command but not with ForEach-Object.
Invoke-Command
ForEach-Object
The variable 'guy' is assigned but never used.PSScriptAnalyzer(PSUseDeclaredVarsMoreThanAssignments)
PSScriptAnalyzer module version is 1.19.0.
1.19.0
The text was updated successfully, but these errors were encountered:
Duplicate of #1163
Sorry, something went wrong.
I've written up #1641 now to explain the state of play here
No branches or pull requests
Steps to reproduce
Expected behavior
Zero problem. Scope issue should be expected with
Invoke-Command
but not withForEach-Object
.Actual behavior
Environment data
PSScriptAnalyzer module version is
1.19.0
.The text was updated successfully, but these errors were encountered: