Skip to content

TableErrorFormatter: improve formatting of error tips #3821

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

Merged
merged 4 commits into from
May 5, 2025

Conversation

FeBe95
Copy link
Contributor

@FeBe95 FeBe95 commented Feb 12, 2025

This PR adds some small improvements to the error output, when using the "table" error formatter:

  1. Align tip text after 💡 emoji
  2. Trim trailing new-line of multi-line tips
Before After
 ------ ----------------------------
  Line   FooBar.php
 ------ ----------------------------
  36     I am an error message.
         🪪  foobar.buz
         💡 I am an error tip.
         💡 I span multiple lines.

         ✏️  FooBar.php
  40     I am an error message.
         🪪  foobar.buz
         💡 I am an error tip.
         💡 I span multiple lines.

         ✏️  FooBar.php
 ------ ----------------------------
 ------ ----------------------------
  Line   FooBar.php
 ------ ----------------------------
  36     I am an error message.
         🪪  foobar.buz
         💡  I am an error tip.
         💡  I span multiple lines.
         ✏️  FooBar.php
  40     I am an error message.
         🪪  foobar.buz
         💡  I am an error tip.
         💡  I span multiple lines.
         ✏️  FooBar.php
 ------ ----------------------------


Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I'd rather remove the extra space after pencil, than have two spaces after 💡 .

@ondrejmirtes ondrejmirtes merged commit 76b094d into phpstan:2.1.x May 5, 2025
414 of 417 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@FeBe95 FeBe95 deleted the patch-1 branch May 5, 2025 09:50
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 this pull request may close these issues.

2 participants