"No errors found!" message is now printed within a nice green block #7150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Last week, I introduced psalm+phpstan to some juniors and I noticed they liked visual feedback of phpstan better than psalm.
I have tried to find why is so.
When errors are found, psalm kinda punishes our eyes with all the red texts of error message, but when we fixed them all, it just prints some dull looking texts. I had to guide the juniors multiple time to just ignore all the texts and look for "No errors found!" among them.
Only way to know psalm run status at a glance is to check if terminal has red color text or not.
I think, psalm should have a success page with green (or similar) color which kinda works as a reward for fixing all the errors. We all love the dopamine hit.
So, I've prepared this PR that will print a nice green block when there are no errors to report.
printSuccessMessage
could be made as more flexible, such as accepting arbitrary message and dynamically calculate padding size. But I think that would increase the complexity unnecessarily since we are printing a hard-coded string anyway.Let me know what do you think. Thanks.