Use a separate CI step to install clang-format before running it

Also use short `-Yqu` flags like our other invocations
This commit is contained in:
Rangi
2026-04-15 20:12:48 -04:00
parent 185a5c5369
commit b3c3981a90
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -13,7 +13,9 @@ jobs:
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install clang-format
run: |
sudo apt-get install -Uyq install clang-format
- name: Check format - name: Check format
run: | run: |
sudo apt --update --yes --quiet install clang-format
contrib/checkformat.sh contrib/checkformat.sh
+2 -2
View File
@@ -243,12 +243,12 @@ coverage:
# Target used in development to format source code with clang-format. # Target used in development to format source code with clang-format.
format: format:
$Qclang-format -i $$(git ls-files '*.hpp' '*.cpp') $Qclang-format -i $$(git ls-files '*.[hc]pp')
# Target used in development to check code with clang-tidy. # Target used in development to check code with clang-tidy.
# Requires Bison-generated header files to exist. # Requires Bison-generated header files to exist.
tidy: src/asm/parser.hpp src/link/script.hpp tidy: src/asm/parser.hpp src/link/script.hpp
$Qclang-tidy -p . $$(git ls-files '*.hpp' '*.cpp') $Qclang-tidy -p . $$(git ls-files '*.[hc]pp')
# Target used in development to remove unused `#include` headers. # Target used in development to remove unused `#include` headers.
iwyu: iwyu: