Skip to content

Commit

Permalink
Updrade clang-tidy to 17
Browse files Browse the repository at this point in the history
  • Loading branch information
coldav committed Jul 19, 2024
1 parent 17f6674 commit 11a0188
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/run_pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ jobs:
llvm_version: 16
llvm_build_type: RelAssert

# installs clang-tidy
- name: setup-clang-tidy
run:
sudo apt-get install -y clang-tidy-12

# These need to match the configurations of build_pr_cache to use the cache effectively
- name: build initial config files
Expand Down Expand Up @@ -159,7 +155,7 @@ jobs:
HEAD..origin/${{ github.base_ref }} | \
grep -P '\.(c|cc|cxx|cpp|h|hh|hpp|hxx)$'` | \
tee /dev/stderr | \
parallel --verbose -- clang-tidy-12 --quiet -p "$PWD/build/" "{}"
parallel --verbose -- clang-tidy-17 --quiet -p "$PWD/build/" "{}"
# ^ When updating the clang-tidy version, the version used by the cmake
# target should match updated c.f. the `tidy` target
Expand All @@ -174,11 +170,11 @@ jobs:

- name: setup-ubuntu-clang-format
run:
pip install clang-format==16.0.6
pip install clang-format==17.0.0

- name: run clang-format
run: |
# we've installed clang-format-16 in the docker via pip, which just installs it as clang-format,
# we've installed clang-format-17 in the docker via pip, which just installs it as clang-format,
# so just use clang-format-diff and -b clang-format directly
git fetch origin ${{ github.base_ref }}
git diff -U0 --no-color origin/${{ github.base_ref }} | \
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ find_package(PythonInterp 3.6 REQUIRED)
# When updating the version here, also update that used in the merge request
# config
find_package(ClangTools 16 COMPONENTS clang-format)
find_package(ClangTools 12 COMPONENTS clang-tidy)
find_package(ClangTools 15 COMPONENTS clang-tidy)
if(TARGET ClangTools::clang-tidy)
ca_option(CA_CLANG_TIDY_FLAGS STRING
"Semi-color separated list of clang-tidy flags" "")
Expand Down

0 comments on commit 11a0188

Please sign in to comment.