Skip to content

feat: output in json format option #317

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 11 commits into from
Jun 24, 2025
Merged

Conversation

sschueller
Copy link

@sschueller sschueller commented Jun 17, 2025

This adds a --json option to the health check command. It is a bit "hacky" so let me know if you want me to do this differently. This pull request also contains the fix from 316

Thanks

Copy link
Collaborator

@kbond kbond left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! Could you rebase to pickup #316?

$isFail = $results->defects(...$failureStatuses)->count() > 0;

if ($isJsonOutput) {
$output->write(\json_encode($results, \JSON_THROW_ON_ERROR, 512));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm guessing this is meant to be read by some kind of automated script but would it hurt to add JSON_PRETTY_PRINT?

Copy link
Author

Choose a reason for hiding this comment

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

It makes no difference in our case. I Added it

@kbond kbond merged commit 6919e35 into liip:3.x Jun 24, 2025
2 of 10 checks passed
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