Skip to content
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

Issue class (optionally) in the error description #287

Closed
rzvc opened this issue Jan 20, 2024 · 4 comments · Fixed by vimeo/psalm#10607
Closed

Issue class (optionally) in the error description #287

rzvc opened this issue Jan 20, 2024 · 4 comments · Fixed by vimeo/psalm#10607

Comments

@rzvc
Copy link

rzvc commented Jan 20, 2024

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
Copy link
Collaborator

tm1000 commented Jan 28, 2024

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
Copy link
Member

weirdan commented Jan 28, 2024

@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
Copy link
Collaborator

tm1000 commented Jan 28, 2024

I don't mind 😀

@rzvc
Copy link
Author

rzvc commented Jan 28, 2024

That was quick. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants