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

feat: improve rule id to always align to right of terminal #64

Closed
wants to merge 1 commit into from

Conversation

spence-s
Copy link

@spence-s spence-s commented Apr 9, 2024

formatter-pretty can show a really nasty looking report if just 1 message exceeds or comes close to exceeding the width of the terminal

The solution below changes the alignment of the ruleId from:

current state: rule ids are aligned at the left most letter, and can line break in middle of the rule id. If any message exceeds the width of the terminal the rule id can end up in strange places for all errors reported usually with a few lines of separation.

PR state: rule ids are always right aligned. If a message exceeds the terminal width, the rule id is right aligned on the last line of the message or the following line depending on how much space it has and things look much better in many difference scenarios.

@spence-s spence-s closed this Apr 10, 2024
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.

None yet

1 participant