mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-21 22:23:05 +00:00
clang-format: Show changes as diff in workflow
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
387cc2ecec
commit
c8afe3412e
2 changed files with 5 additions and 2 deletions
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
|
@ -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
|
||||
|
|
2
Makefile
2
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:
|
||||
|
|
Loading…
Reference in a new issue