From 23973b8472325393bfd66fd0d59b413d803b5815 Mon Sep 17 00:00:00 2001 From: Aaron Jomy <75925957+maximusron@users.noreply.github.com> Date: Thu, 4 Apr 2024 15:34:19 +0200 Subject: [PATCH] Update clang-format.yml (#216) --- .github/workflows/clang-format.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)