Skip to content

Commit

Permalink
Downgrade format checker to clang-format-14
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnmp committed Jan 23, 2024
1 parent 891f57b commit 0ec338e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/format-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt install -y git clang-format-18
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 100
sudo update-alternatives --set clang-format /usr/bin/clang-format-18
sudo ./llvm.sh 14
sudo apt install -y git clang-format-14
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 100
sudo update-alternatives --set clang-format /usr/bin/clang-format-14
- name: Check Formatting
run: |
cd ${{ github.workspace }}
git reset --soft $(git merge-base HEAD origin/master)
diff=$(git clang-format-18 --style=file --diff)
diff=$(git clang-format-14 --style=file --diff)
if [ $(echo "${diff}" | wc -l) != 1 ]; then
echo "Formatting errors detected! Suggested changes:" >&2
echo "${diff}" >&2
exit 1
else
echo "No formatting errors detected!"
exit 0
fi
fi

0 comments on commit 0ec338e

Please sign in to comment.