psalm / psalm-vscode-plugin

VS Code plugin for Psalm
MIT License
44 stars 14 forks source link

Issue class (optionally) in the error description #287

Closed rzvc closed 6 months ago

rzvc commented 6 months ago

Would be nice to have the ability to add the issue type to the error description.

As it is, if I want to suppress a particular error, I have to run psalm externally in order to obtain the class of issue that I want to suppress.

For example, instead of just "Unable to determine the type that $x is being assigned to", it could say "[MixedAssignment] Unable to determine the type that $x is being assigned to".

Is this already possible to do?

tm1000 commented 6 months ago

If you use quick fixes it'll add the suppression automatically. You can also click the number link in the hover and it'll send you to the corresponding page.

weirdan commented 6 months ago

@tm1000 would you be opposed to including the issue type in the message itself though? This could be a simple server-side fix, and all clients would benefit from it. I, for one, would love to see it in nvim as well, e.g.: image

tm1000 commented 6 months ago

I don't mind 😀

rzvc commented 6 months ago

That was quick. Thanks!