New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ignore UnnecessaryVarAnnotation #6242
Conversation
the #3573 has been fixed before but the fix was removed. @orklah could you add a regression test, if possible, so the fix does not get removed again? i tested my code regarding #3573 without your fix of psalm, and it reproduced #3573. |
I don't think the fix was removed. It was just two different places and only one place was fixed before |
I'll check what's going on. Psalm considers the suppression as not used, it's weird |
@orklah if you manage to fix the unused suppression, mind checking if it also fixes those issues below? https://github.com/vimeo/psalm/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+unusedpsalmsuppress |
I think the build should be green now. The issue with the weird UnusedSuppress was because psalm's tests don't enable find_unused_variables by default. This flag is required to emit UnnecessaryVarAnnotation in the first place so the suppression was useless without this flag. Seems unrelated to other issues but I have a better grasp of suppressions now, I may take some time to check those |
You were in for a surprise then 🤣 |
🤣 I launched phpunit on my machine but only fixed the failures, not the errors. I think I've just worn out my _ key by adding it to all those unused vars EDIT: Yes! I did it! At last! |
should be ok now :) |
Thanks! |
This PR re-fix #3573
The original fix partially fixed the issue