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
Thanks for reporting the case. However, it is a known issue that PSUseDeclaredVarsMoreThanAssignments can produce false positives for more than a year and there are several similar issues in this repo already. Given the low ressources on this project from the Microsoft side at the moment, it might take quite some time until PSUseDeclaredVarsMoreThanAssignments get fixed. Nevertheless it is still good to have all use cases collateted to help testing it should someone step into doing this ambitious task.
PSScriptAnalyzer correctly displays
PSUseDeclaredVarsMoreThanAssignments
given the following code:$someVariable = 'some value'
However, we can prevent this by declaring a type for variable a type. e.g.
[string]$someVariable = 'some value'
The text was updated successfully, but these errors were encountered: