yamlfix
yamlfix copied to clipboard
Add a mode that exits nonzero for format violations instead of fixing
Description
I'd like to have a CI check that yamlfix has been run by the dev. A lot of the rest of my CI infrastructure expects a nonzero exit code, like black --check
.
Possible Solution
I read the docs, and this does not seem like an option. If it is a doc fix, that should be easy enough. Otherwise, i can probably make a PR for this as well.
Additional context
Related Issue
This is already a feature: https://github.com/lyz-code/yamlfix/blob/main/src/yamlfix/entrypoints/cli.py#L41-L45
Nice! I think me and @jamesliu4c missed this because there's no mention of this functionality on https://lyz-code.github.io/yamlfix/.
Oh, nice. Thanks! Will you accept a PR to add it to the docs?