From 7a6c2d77a34db94b1a12fc89dece707b9b1ddcda Mon Sep 17 00:00:00 2001 From: Pavel Chekin Date: Fri, 12 Jan 2024 14:23:11 -0800 Subject: [PATCH] Show diff on pre-commit failure (#248) When pre-commit fails in CI, show changes (if any) made by pre-commit hooks. --- .github/workflows/build_and_test_2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test_2.yaml b/.github/workflows/build_and_test_2.yaml index 50f9be6e78..b2f04777d6 100644 --- a/.github/workflows/build_and_test_2.yaml +++ b/.github/workflows/build_and_test_2.yaml @@ -57,7 +57,7 @@ jobs: # If first run of yapf worked and made changes reset the tree to the original state git reset --hard - python3 -m pre_commit run --all-files --verbose + python3 -m pre_commit run --show-diff-on-failure --color=always --all-files --verbose - name: Save pip cache if: ${{ hashFiles('.pip-cache') == '' }}