From eb3e1660f2426ca3d5a068c28de3140dfc9764f7 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sat, 6 Jun 2020 09:48:59 -0400 Subject: [PATCH] Print git-diff when pre-commit fails 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 Change-Id: Icd6484c8c4157d38885b1de460517d9b656a06d7 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6fc52f14..2a532c9c 100644 --- a/tox.ini +++ b/tox.ini @@ -64,7 +64,7 @@ description = Precommit checks for black, gitlint, etc. basepython = python3 deps = pre-commit commands = - pre-commit run --all-files + pre-commit run --all-files --show-diff-on-failure [testenv:reno] description = OpenStack Reno checks -- 2.16.6