From 40c1806654781ad91b231b421ce605672516f8fe Mon Sep 17 00:00:00 2001 From: Soren Ptak Date: Tue, 28 Nov 2023 15:13:56 -0500 Subject: [PATCH] Make the formatting workflow print the git diff for now --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea56938..52ce045 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,15 +21,18 @@ jobs: - name: Run Uncrustify run: | uncrustify --version - find . -iname "*.[hc]" -exec uncrustify --check -c tools/uncrustify.cfg {} + + find . -iname "*.[hc]" -exec uncrustify --no-backup --replace --if-changed -c tools/uncrustify.cfg {} + if [ "$?" = "0" ]; then exit 0 else echo -e "\033[31;1;43mFormatting check (using Uncrustify) failed...\033[0m" echo -e "\033[32;3mTo have the code uncrustified for you, please comment '/bot run uncrustify' (without the quotes) on the Pull Request.\033[0m" + git diff --color=always exit 1 fi - name: Check For Trailing Whitespace + shell: bash + if: success() || failure() run: | set +e grep --exclude="README.md" -rnI -e "[[:blank:]]$" .