IntelliSense reports warning incorrectly in foreach-object begin parameter #4382
Closed
5 of 6 tasks
Labels
Issue-Bug
A bug to squash.
Resolution-Duplicate
Will close automatically.
Resolution-External
Will close automatically.
Prerequisites
Summary
Incorrect warning "variable assigned but never used" in foreach-object, parameter -begin
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
code this:
ForEach-Object -Begin{ $a=1 } -Process{ $a++ } -End{ $a }
Notice that it warns:
Msg: The variable 'a' is assigned but never used. PSScriptAnalyzer(PSUseDeclaredVarsMoreThanAssignments)
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: