Output Formats¶
GitHooks supports three output formats: text, json, and junit.
Text (default)¶
Human-readable output with status, time, and error details:
parallel_lint - OK. Time: 150ms
phpcs_src - OK. Time: 890ms
phpstan_src - KO. Time: 2.34s
phpstan_src:
/src/Foo.php:12 Access to undefined property $bar
Results: 2/3 passed in 3.45s
JSON¶
Machine-readable output for CI pipelines, scripts, or AI tools:
The JSON output includes: flow name, overall success, total time, and an array of job results with name, success, time, output, and fixApplied.
With --dry-run, each job result includes a command field showing the shell command that would run.
JUnit¶
JUnit XML compatible with CI test reporting tools (GitHub Actions, GitLab CI, Jenkins):
Use with test reporting actions:
# GitHub Actions
- run: vendor/bin/githooks flow qa --format=junit > junit.xml
- uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: junit.xml
Single job output¶
The --format flag also works with the job command:
Dry-run¶
Combine --dry-run with any format to see what commands would run: