Repository navigation
Replies: 3 comments
|
We currently explicitly route prek's output to reviewdog, do some efm matching to post lint annotations back to github code. Having this could help us avoid that. |
0 replies
|
An AI efficient format would be ace, would that be |
0 replies
|
I think I'll start with just two values for |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Add
--output-format <OUTPUT_FORMAT>toprek runto control howprekprints hook diagnostics and execution results.Proposal
prekshould format the reporting data it owns, including the project, hook ID, name, alias, status, exit code, duration, file-modification status, and captured hook output. File, line, column, and rule metadata should be included when available.Output from external hooks should remain opaque and be preserved as captured output.
--output-formatmust not parse or rewrite arbitrary hook output, change hook arguments, or forward the option to hook commands.Possible values
Human-readable formats
These formats are intended for people and are not stable parsing surfaces. Their presentation may change for readability.
textfile:line:col: [RULE] message. This is the default.fullconcisefile:line:col rule message, omitting unavailable location fields.groupedMachine-readable formats
These are committed output surfaces intended for programmatic consumption and compatibility across versions.
jsonjson-linessarifjunitrdjsonIntegration formats
These are stable integrations but may track changes to the formats expected by their target platforms.
github::warningand::errorannotations.gitlabazurepylintExample
Usage
$ prek run --all-files --output-format json > prek-results.jsonAcceptance criteria
prek run --helpdocuments--output-format, its default, and every supported value.textremains the default and preserves the existing human-readable reporting style.prek-owned hook result metadata and preserves captured external hook output without parsing it.References
--output-format=jsoninprek list#430prekCLI referenceoutput-formatcheck --output-formatuv audit --output-formatAll reactions