Skip to content

Commit

Permalink
[ci] Explain how to apply clang-format on multiple commits
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed Apr 3, 2024
1 parent 7b2b713 commit 2ff9fc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ jobs:
-c color.diff.whitespace='red reverse' \
clang-format-15 --diff --binary clang-format-15 --commit $PR_BASE -- demos/ include/ lib/ tools/ || \
(echo "Please run the following git-clang-format locally to fix the formatting: \n
git clang-format origin/master -- demos/ include/ lib/ tools/" && exit 1)
git-clang-format HEAD~\n
for multiple commits we should place the formatting changes in the related commit with:\n
\t\tgit rebase -i -x \"git-clang-format-15 master && git commit -a --allow-empty --fixup=HEAD\" --strategy-option=theirs origin/master\n
\t\t Then inspect the results with: git log --oneline\n
\t\t Then squash without poluting the history with: git rebase --autosquash -i master\n" && exit 1)

0 comments on commit 2ff9fc1

Please sign in to comment.