From a3485b34f3f0ee1b929cb6a245fb37bca16708c9 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sat, 6 Jun 2020 09:54:01 -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: Ia291e121a0882374e1f13180a237f89bde9be68b --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 0818f5e..e1646d3 100644 --- a/tox.ini +++ b/tox.ini @@ -48,4 +48,4 @@ deps = pre-commit commands = pre-commit install - pre-commit run --all-files + pre-commit run --all-files --show-diff-on-failure -- 2.16.6