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
Anyways, I think that these two rules (PSUseDeclaredVarsMoreThanAssignments and PSReviewUnusedParameter) have been overcomplicated the issue were it could just be: don't warn if the concerned variable can be found back (anywhere) in the script (even this might not capture everything, it is better than a false-possitive)
Steps to reproduce
(Initially reported in downstream repo, see ant-druha/intellij-powershell#96, but with my adjustments to better demonstrate the behavior.)
Expected behavior
There should be no warnings about the initial value of the
$Hashes
variable not being used in this code.To demonstrate that it is in fact used, run the code, and you'll see output
testSome-String Some-String Some-String
:test
value was used.Actual behavior
Environment data
While it was reported in intellij-powershell where we bundle v1.21.0, I was also able to reproduce the same in VSCode.
Additional Information
From a quick look, it may be related to #1472.
The text was updated successfully, but these errors were encountered: