File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 30
30
- name : Run git-clang-format
31
31
run : |
32
32
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
37
36
echo "::error::Code is not properly formatted. Please run 'git clang-format-18 HEAD~' locally. \n
38
37
for multiple commits we should place the formatting changes in the related commit with:\n
39
38
\t\tgit rebase -i -x 'git-clang-format-18 master && git commit -a --allow-empty --fixup=HEAD' --strategy-option=theirs origin/master\n
You can’t perform that action at this time.
0 commit comments