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

Fix colorizing summaries when outputted via --include #548

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

ecooper
Copy link
Contributor

@ecooper ecooper commented Dec 18, 2024

Problem

I noticed summary outputs do not fully colorize the FQL diagnostic help/hints/text when used with --include.

Screenshot 2024-12-18 at 3 44 33 PM

Specifically, all "|" and "^" should be red the above example.

Solution

Update the regular expression used for summary colorization to be the same as query errors. To do this, I needed to strip ansi when checking if it is a fql diagnostic line. This isn't ideal, but it's out of scope to revisit the yaml formatting for these at the moment.

While I was here, I expanded the regex to support lines >9.

Result

Summaries:
Screenshot 2024-12-18 at 3 44 06 PM

Errors
Screenshot 2024-12-18 at 3 45 02 PM

Testing

I added a regex test suite for how we detect fql diagnostic lines.

@ecooper ecooper requested a review from a team as a code owner December 18, 2024 23:50
Copy link
Contributor

@ptpaterson ptpaterson left a comment

Choose a reason for hiding this comment

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

Awesome!

@ecooper ecooper merged commit 40894cd into v3 Dec 19, 2024
4 checks passed
@ecooper ecooper deleted the v3-fix-summary-colors branch December 19, 2024 16:47
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.

3 participants