Skip to content

Commit eb7548e

Browse files
committed
fix
1 parent fff5858 commit eb7548e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/clang-format.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ jobs:
3030
- name: Run git-clang-format
3131
run: |
3232
PR_BASE=$(git rev-list ${{ github.event.pull_request.head.sha }} ^${{ github.event.pull_request.base.sha }} | tail --lines 1 | xargs -I {} git rev-parse {}~1)
33-
echo "running git clang-format against $PR_BASE commit"
34-
GIT="git -c color.ui=always -c diff.wsErrorHighlight=all -c color.diff.whitespace=red reverse"
35-
36-
if ! $GIT clang-format-18 --diff --binary clang-format-18 $PR_BASE; then
33+
echo "Running git clang-format against $PR_BASE commit"
34+
if ! git -c color.ui='always' -c diff.wsErrorHighlight='all' -c color.diff.whitespace='red reverse' \
35+
clang-format-18 --diff --binary clang-format-18 $PR_BASE; then
3736
echo "::error::Code is not properly formatted. Please run 'git clang-format-18 HEAD~' locally. \n
3837
for multiple commits we should place the formatting changes in the related commit with:\n
3938
\t\tgit rebase -i -x 'git-clang-format-18 master && git commit -a --allow-empty --fixup=HEAD' --strategy-option=theirs origin/master\n

0 commit comments

Comments
 (0)