pre-commit is a great tool and id like to incorporate it into jenkins pipelines just to make sure someone didn't try to skip it during committing to the repo.
so my questions are:
success
or fail
?as the docs indicate the best way to run pre-commit
in a CI system is with pre-commit run
, usually pre-commit run --all-files --show-diff-on-failure
this will exit nonzero which should fail your pipeline as desired
disclaimer: I'm the creator of pre-commit