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
I'm not entirely sure if this lies more with PSScriptAnalyzer itself or with a combination of it and the extension. A common thing I will do is set a boolean in a ForEach\ForEach-Object loop that I use for validation later in the script. If I set the value in either a ForEach-Object loop or a .net ForEach loop then the analyzer will inform me the variable is never used. If I set it in a ForEach loop it works fine.
PowerShell Version
Name Value---- -----PSVersion 7.2.2PSEdition CoreGitCommitId 7.2.2OS Microsoft Windows 10.0.17763Platform Win32NTPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}PSRemotingProtocolVersion 2.3SerializationVersion 1.1.0.1WSManStackVersion 3.0
Prerequisites
Summary
I'm not entirely sure if this lies more with PSScriptAnalyzer itself or with a combination of it and the extension. A common thing I will do is set a boolean in a ForEach\ForEach-Object loop that I use for validation later in the script. If I set the value in either a ForEach-Object loop or a .net ForEach loop then the analyzer will inform me the variable is never used. If I set it in a ForEach loop it works fine.
PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: