When pre-commit fails and automatically fixes issues for us in Jenkins
we are not able to see what pre-commit automatically fixed. Adding
--show-diff-on-failure makes pre-commit perform a git-diff immediately
after failing to ensure more useful output is printed to inform the
contributor what changes are needed to pass the check.
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I0c9fc6afa8be214d03e342b2913205e946aa901e
deps =
pre-commit
commands =
- pre-commit run --all-files
+ pre-commit run --all-files --show-diff-on-failure
pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
#########