Skip to content

Commit

Permalink
Make the formatting workflow print the git diff for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Skptak committed Nov 28, 2023
1 parent 44c7051 commit 40c1806
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:]]$" .
Expand Down

0 comments on commit 40c1806

Please sign in to comment.