Skip to content

Commit b3c3981

Browse files
committed
Use a separate CI step to install clang-format before running it
Also use short `-Yqu` flags like our other invocations
1 parent 185a5c5 commit b3c3981

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/checkformat.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jobs:
1313
steps:
1414
- name: Checkout repo
1515
uses: actions/checkout@v6
16+
- name: Install clang-format
17+
run: |
18+
sudo apt-get install -Uyq install clang-format
1619
- name: Check format
1720
run: |
18-
sudo apt --update --yes --quiet install clang-format
1921
contrib/checkformat.sh

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ coverage:
243243

244244
# Target used in development to format source code with clang-format.
245245
format:
246-
$Qclang-format -i $$(git ls-files '*.hpp' '*.cpp')
246+
$Qclang-format -i $$(git ls-files '*.[hc]pp')
247247

248248
# Target used in development to check code with clang-tidy.
249249
# Requires Bison-generated header files to exist.
250250
tidy: src/asm/parser.hpp src/link/script.hpp
251-
$Qclang-tidy -p . $$(git ls-files '*.hpp' '*.cpp')
251+
$Qclang-tidy -p . $$(git ls-files '*.[hc]pp')
252252

253253
# Target used in development to remove unused `#include` headers.
254254
iwyu:

0 commit comments

Comments
 (0)