From 1aede04af75564d4063f91d1c8c1a402760e86f5 Mon Sep 17 00:00:00 2001 From: "Dongjia \"toka\" Zhang" Date: Sat, 4 Nov 2023 17:45:01 +0100 Subject: [PATCH] Use clang-format-16 (#1649) --- .github/workflows/build_and_test.yml | 6 +++--- scripts/fmt_all.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 29fda2c9ab..0cc44eab5f 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -68,7 +68,7 @@ jobs: - name: Install and cache deps uses: awalsh128/cache-apt-pkgs-action@v1.1.0 with: - packages: llvm-15 llvm-15-dev clang-15 ninja-build clang-format-13 shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev + packages: llvm-15 llvm-15-dev clang-15 ninja-build clang-format-16 shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev - name: get clang version run: command -v llvm-config-15 && clang-15 -v - name: Add nightly rustfmt and clippy @@ -85,7 +85,7 @@ jobs: - name: Cleanup run: cargo clean - name: Run clang-format style check for C/C++ programs. - run: clang-format-13 -n -Werror --style=file $(find . -type f \( -name '*.cpp' -o -iname '*.hpp' -o -name '*.cc' -o -name '*.cxx' -o -name '*.cc' -o -name '*.h' \) | grep -v '/target/' | grep -v 'libpng-1\.6\.37' | grep -v 'stb_image\.h' | grep -v 'dlmalloc\.c' | grep -v 'QEMU-Nyx') + run: clang-format-16 -n -Werror --style=file $(find . -type f \( -name '*.cpp' -o -iname '*.hpp' -o -name '*.cc' -o -name '*.cxx' -o -name '*.cc' -o -name '*.h' \) | grep -v '/target/' | grep -v 'libpng-1\.6\.37' | grep -v 'stb_image\.h' | grep -v 'dlmalloc\.c' | grep -v 'QEMU-Nyx') - name: run shellcheck run: shellcheck ./scripts/*.sh - name: Run clippy @@ -129,7 +129,7 @@ jobs: - name: Install and cache deps uses: awalsh128/cache-apt-pkgs-action@v1.1.0 with: - packages: llvm-15 llvm-15-dev clang-15 ninja-build clang-format-13 shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev + packages: llvm-15 llvm-15-dev clang-15 ninja-build clang-format-16 shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev - name: get clang version run: command -v llvm-config-15 && clang-15 -v - name: Install cargo-hack diff --git a/scripts/fmt_all.sh b/scripts/fmt_all.sh index 959ed9e62e..f401a9f10f 100755 --- a/scripts/fmt_all.sh +++ b/scripts/fmt_all.sh @@ -11,7 +11,7 @@ cargo +nightly fmt echo "[*] Formatting C(pp) files" # shellcheck disable=SC2046 -clang-format-13 -i --style=file $(find . -type f \( -name '*.cpp' -o -iname '*.hpp' -o -name '*.cc' -o -name '*.cxx' -o -name '*.cc' -o -name '*.c' -o -name '*.h' \) | grep -v '/target/' | grep -v 'libpng-1\.6\.37' | grep -v 'stb_image\.h' | grep -v 'dlmalloc\.c') +clang-format-16 -i --style=file $(find . -type f \( -name '*.cpp' -o -iname '*.hpp' -o -name '*.cc' -o -name '*.cxx' -o -name '*.cc' -o -name '*.c' -o -name '*.h' \) | grep -v '/target/' | grep -v 'libpng-1\.6\.37' | grep -v 'stb_image\.h' | grep -v 'dlmalloc\.c')