build: target clang-format version 17 (#6631)

This commit is contained in:
Cœur 2024-03-05 07:49:39 +08:00 committed by GitHub
parent 50dca24f50
commit 04956c35b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -89,8 +89,8 @@ jobs:
run: |
set -ex
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
sudo apt-get install -y clang-format-15 npm
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"
sudo apt-get install -y clang-format-17 npm
- name: Check for style diffs
id: check-for-diffs
working-directory: .

View File

@ -40,10 +40,10 @@ find_cfiles() {
! \( $(get_find_path_args $(trim_comments .clang-format-ignore)) \) "$@"
}
# We're targeting clang-format version 15 and other versions give slightly
# different results, so prefer `clang-format-15` if it's installed.
# We're targeting clang-format version 17 and other versions give slightly
# different results, so prefer `clang-format-17` if it's installed.
clang_format_exe_names=(
'clang-format-15'
'clang-format-17'
'clang-format'
)
for name in ${clang_format_exe_names[@]}; do