Move to clang-format 15 (#621)

The current version requires clang-format-9.  This now getting hard to get.
This commit moves it to the clang-format-15, which is the latest in 22.04.

Also, updates clang-tidy to 15 as well.
This commit is contained in:
Matthew Parkinson
2023-07-18 11:24:07 +01:00
committed by GitHub
parent cdfedd8718
commit 9d4466093a
20 changed files with 282 additions and 346 deletions

View File

@@ -400,12 +400,14 @@ jobs:
# Job to run clang-format and report errors
format:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
# We don't need to do the build for this job, but we need to configure it to get the clang-format target
steps:
- uses: actions/checkout@v3
- name: Install clang-tidy and clang-format
run: sudo apt install clang-tidy-9 clang-format-9
run: |
sudo apt update
sudo apt install clang-tidy-15 clang-format-15
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DSNMALLOC_USE_CXX17=ON
# Run the clang-format check and error if it generates a diff
@@ -417,7 +419,7 @@ jobs:
git diff --exit-code
- name: Run clang-tidy
run: |
clang-tidy-9 src/snmalloc/override/malloc.cc -header-filter="`pwd`/*" -warnings-as-errors='*' -export-fixes=tidy.fail -- -std=c++17 -mcx16 -DSNMALLOC_PLATFORM_HAS_GETENTROPY=0
clang-tidy-15 src/snmalloc/override/malloc.cc -header-filter="`pwd`/*" -warnings-as-errors='*' -export-fixes=tidy.fail -- -std=c++17 -mcx16 -DSNMALLOC_PLATFORM_HAS_GETENTROPY=0
if [ -f tidy.fail ] ; then
cat tidy.fail
exit 1