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
{{ message }}
Repository navigation
PSUseDeclaredVarsMoreThanAssignment not correctly handling array adds #699
Joel Bennett (@Jaykul) Actually, it is a problem of both the += operator being treated as assignment (not usage) , I will therefore extract your examples (that I think are valid) because I found a solution to the originally raised issue that is due to +=
Activity
Fix static analysis warnings
Fix static analysis warnings
DexterPOSH commentedon Jul 6, 2017
bump
Is this fixed already? I still see these false positives.
Jaykul commentedon Dec 22, 2017
It's not the array, it's the ForEach loop
It also happens if you define a variable in the begin block of the ForEach, like this:
Or when you use a hashtable like:
bergmeister commentedon Mar 14, 2018
Joel Bennett (@Jaykul) Actually, it is a problem of both the
+=operator being treated as assignment (not usage) , I will therefore extract your examples (that I think are valid) because I found a solution to the originally raised issue that is due to+=