Skip to content

Commit daaed1d

Browse files
committed
Fix display of code changes in clang-format CI action
Versions of `git-clang-format` later than 11 issue exit code 1 when changes were made to the source code. Although our CI job ended with a non-zero exit code as expected, it terminated early than wanted so that the differences are not printed to the log.
1 parent 32143dd commit daaed1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: .github/workflows/pull-request-check-clang-format.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ echo "Checking for formatting errors introduced since $MERGE_BASE"
2626

2727
# Do the checking. "eval" is used so that quotes (as inserted into $EXCLUDES
2828
# above) are not interpreted as parts of file names.
29-
eval git-clang-format-15 --binary clang-format-15 $MERGE_BASE -- $EXCLUDES
29+
eval git-clang-format-15 --binary clang-format-15 $MERGE_BASE -- $EXCLUDES || true
3030
git diff > formatted.diff
3131
if [[ -s formatted.diff ]] ; then
3232
echo 'Formatting error! The following diff shows the required changes'

0 commit comments

Comments
 (0)