diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 2517ea31d..3b81ed486 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -43,4 +43,8 @@ jobs: -c color.diff.whitespace='red reverse' \ clang-format-15 --diff --binary clang-format-15 --commit $PR_BASE -- include/ lib/ || \ (echo "Please run the following git-clang-format locally to fix the formatting: \n - git clang-format origin/main -- include/ lib/" && 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 main && git commit -a --allow-empty --fixup=HEAD\" --strategy-option=theirs origin/main\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 main\n" && exit 1)