diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index debdaf44..4612d25c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: rm -f ~/.cargo/bin/cargo-fmt rustup toolchain install nightly --component rustfmt --component clippy --allow-downgrade - - name: install clang-format-17 + - name: install clang-format-18 run: | 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-18 main' @@ -36,5 +36,8 @@ jobs: - name: Run format-check run: | + make format CLANG_FORMAT=clang-format-18 + git diff + git reset --hard make format-check CLANG_FORMAT=clang-format-18 make rustfmt-check diff --git a/Makefile b/Makefile index 8d1d56e0..2620e720 100644 --- a/Makefile +++ b/Makefile @@ -176,7 +176,7 @@ clean: format: $(CLANG_FORMAT) -i src/*.c src/dcp/*.c src/math/*.c src/*.h src/dcp/*.h src/math/*.h sysinc/*.h format-check: - $(CLANG_FORMAT) --dry-run --Werror src/*.c src/*.h src/dcp/*.c src/dcp/*.h sysinc/*.h + $(CLANG_FORMAT) --dry-run --Werror src/*.c src/dcp/*.c src/math/*.c src/*.h src/dcp/*.h src/math/*.h sysinc/*.h rustfmt: cd rust && cargo fmt rustfmt-check: