psalm
psalm copied to clipboard
Add possibility to move all inline suppressions to baseline
Hello :wave:
Im currently working on a larger project where initially inline suppresses where used to ignore some psalm errors. Now the decision was made to use instead a baseline to get a better feeling how much if off and to track it in a single source. Best case would be now to migrate the suppressions into the baseline, but AFAIK this is not automatically possible.
Do you think this would be beneficial? Is it even technical possible right now? Or maybe best case: There is already something like that which i did oversee?
Hey @DanielBadura, can you reproduce the issue on https://psalm.dev ?
Hi! To be sure I understood, what you want to achieve is basically to remove each @psalm-suppress
from the code and then re-run psalm in --set-baseline
mode, correct?
I'm not sure it would be possible in one swipe (because I think Psalm will read suppression before removing them and baselining will only add non-suppressed issues). However, it should be pretty simple to create a small plugin that just removes suppressions and then re-run psalm after that
Yeah thats what i want to achieve. If it's a 2 step progress it would be fine. So it sounds as if there is already something that removes all suppresses?
It doesn't exists but I don't think it would be very difficult to create