From 11b62e8b9861a40957df3e56a1a110f78e436b75 Mon Sep 17 00:00:00 2001 From: Graeme Andrew Stewart Date: Tue, 3 Mar 2026 16:23:53 +0100 Subject: [PATCH 1/3] Filter clang-format inputs Only care about our files, not submodules --- cmake/clang-format.cmake | 4 ++-- doc/HSF-Bronze_Project-CD7F32.svg | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 doc/HSF-Bronze_Project-CD7F32.svg diff --git a/cmake/clang-format.cmake b/cmake/clang-format.cmake index 1d5efe75..1279f8d1 100644 --- a/cmake/clang-format.cmake +++ b/cmake/clang-format.cmake @@ -7,8 +7,8 @@ set(CLANG_FORMAT "clang-format" CACHE STRING "Clang format binary") message(STATUS "Setting clang-format test binary to '${CLANG_FORMAT}' (use -DCLANG_FORMAT to change)") -# Get all project files -file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.h) +# Get all project files (only within package, ignore submodules) +file(GLOB_RECURSE ALL_SOURCE_FILES package/*.cpp package*.h) # Using --style=Google uses the built in rules of # the clang format binary. This is slightly diff --git a/doc/HSF-Bronze_Project-CD7F32.svg b/doc/HSF-Bronze_Project-CD7F32.svg deleted file mode 100644 index 68cc0f22..00000000 --- a/doc/HSF-Bronze_Project-CD7F32.svg +++ /dev/null @@ -1 +0,0 @@ -HSF: Bronze ProjectHSFBronze Project \ No newline at end of file From 4da2e472edb3a5dd135b0117727757e1231b6b7e Mon Sep 17 00:00:00 2001 From: Graeme Andrew Stewart Date: Tue, 3 Mar 2026 16:26:46 +0100 Subject: [PATCH 2/3] Fix glob --- cmake/clang-format.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/clang-format.cmake b/cmake/clang-format.cmake index 1279f8d1..b6d81366 100644 --- a/cmake/clang-format.cmake +++ b/cmake/clang-format.cmake @@ -8,7 +8,7 @@ set(CLANG_FORMAT "clang-format" CACHE STRING "Clang format binary") message(STATUS "Setting clang-format test binary to '${CLANG_FORMAT}' (use -DCLANG_FORMAT to change)") # Get all project files (only within package, ignore submodules) -file(GLOB_RECURSE ALL_SOURCE_FILES package/*.cpp package*.h) +file(GLOB_RECURSE ALL_SOURCE_FILES package/*.cpp package/*.h) # Using --style=Google uses the built in rules of # the clang format binary. This is slightly From 7b4b909412724989614895639a722f37667f25f4 Mon Sep 17 00:00:00 2001 From: Graeme Andrew Stewart Date: Tue, 3 Mar 2026 16:58:39 +0100 Subject: [PATCH 3/3] Also run on pull request --- .github/workflows/clang-format.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 55bd6f08..e7a3a610 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -6,6 +6,8 @@ name: Clang-Format on: push: branches-ignore: [ main, stable ] + pull_request: + branches: [ main, stable ] # Defines the main job where we checkout our code, run clang-format # and commit changes