Skip to content

feat: output in json format option#317

Merged
kbond merged 11 commits intoliip:3.xfrom
sschueller:3.x-json-format
Jun 24, 2025
Merged

feat: output in json format option#317
kbond merged 11 commits intoliip:3.xfrom
sschueller:3.x-json-format

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