-
Notifications
You must be signed in to change notification settings - Fork 2
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
highlight expected and actual value in error messages #13
Comments
Thank you for your feedback and suggestion! I understand you're proposing to make PHPStan's error messages more human-readable and easier to understand. You're right; if we can achieve this as a formatter, it would indeed be very helpful. Currently, our formatter is outputting PHPStan's error messages as-is. These messages lack consistency in their format, which could make parsing them challenging. However, I think it's worth exploring this idea further. |
thanks for getting back to me. there is currently a discussion on how the data can/needs to be represented to ease use from error formatters: |
Thank you for following up and sharing that discussion link. I wasn't aware of this ongoing conversation about improving error formatters in PHPStan. The approach discussed in phpstan/phpstan#11581 indeed looks promising. It would be a significant enhancement if such functionality were integrated directly into PHPStan. This kind of improvement could greatly benefit all error formatters, including ours. While i want to avoid simply copying their ideas, I'll review the thread carefully and see how i might incorporate similar concepts in a way that's appropriate for friendly formatter. Thank you again for bringing this to our attention. |
thank you for this nice formatter.
I want to suggest to color or format the expected and actual value of rule errors, since these are usually the most important part of an error message. additionaly these are often-times only separated by a single
,
so e.g. on big array shapes its pretty hard to see where the actual value ended and where the expected value beginssomething like
The text was updated successfully, but these errors were encountered: