From b3c3981a90c8aeb923456eb6817b4208672226b8 Mon Sep 17 00:00:00 2001 From: Rangi Date: Wed, 15 Apr 2026 20:12:48 -0400 Subject: [PATCH] Use a separate CI step to install clang-format before running it Also use short `-Yqu` flags like our other invocations --- .github/workflows/checkformat.yml | 4 +++- Makefile | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checkformat.yml b/.github/workflows/checkformat.yml index 74f72095..d94277e2 100644 --- a/.github/workflows/checkformat.yml +++ b/.github/workflows/checkformat.yml @@ -13,7 +13,9 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v6 + - name: Install clang-format + run: | + sudo apt-get install -Uyq install clang-format - name: Check format run: | - sudo apt --update --yes --quiet install clang-format contrib/checkformat.sh diff --git a/Makefile b/Makefile index b8235290..8f7f1ad9 100644 --- a/Makefile +++ b/Makefile @@ -243,12 +243,12 @@ coverage: # Target used in development to format source code with clang-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. # Requires Bison-generated header files to exist. 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. iwyu: