Skip to content

Commit

Permalink
Merge pull request #3869 from canonical/upgrade-to-clang-format-16
Browse files Browse the repository at this point in the history
[ci] update clang-format to 16
  • Loading branch information
ricab authored Jan 8, 2025
2 parents 4d27d5c + 409493a commit fc3249c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ runs:

- name: Install clang-format
shell: bash
run: sudo apt-get install --no-install-recommends --yes clang-format-12
run: sudo apt-get install --no-install-recommends --yes clang-format-16

- name: Run clang-format through the diff
shell: bash
run: |
set -e -o pipefail
# On pull requests, HEAD^1 will always be the merge base, so consider that diff for formatting.
git diff -U0 --no-color HEAD^1 | clang-format-diff-12 -p1 | tee ${HOME}/clang-diff
git diff -U0 --no-color HEAD^1 | clang-format-diff-16 -p1 | tee ${HOME}/clang-diff
if [ "$( stat --printf='%s' ${HOME}/clang-diff )" -ne 0 ]; then
echo "##[error] Please apply the above diff to correct formatting"
exit 1
Expand Down

0 comments on commit fc3249c

Please sign in to comment.