From 3657133f4fa20fcf288a732a74a765c0e347c3e9 Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Mon, 10 Aug 2026 15:58:46 +0100 Subject: [PATCH 1/2] Remove unnecessary clang format hook C++ files are already formatted by the general `//:format.fix`, if we just enable it for them. This means we only start up Bazel once, rather than per file, which makes it faster. --- .pre-commit-config.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d88056a30a..13cf99589f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,16 +23,11 @@ repos: name: //:format.fix entry: bazel run //:format.fix language: system - files: (BUILD|BUILD\.bazel|WORKSPACE|\.bazelrc|[^/]+\.(py|bzl|bazel|yaml|yml|rs))$ + files: (BUILD|BUILD\.bazel|WORKSPACE|\.bazelrc|[^/]+\.(py|bzl|bazel|yaml|yml|rs|c|cpp|h|hpp))$ pass_filenames: false - repo: https://github.com/pocc/pre-commit-hooks rev: v1.3.5 hooks: - - id: clang-format - name: clang-format - entry: bazel run //:format.fix_C++_with_clang-format - language: system - files: '\.(c|cc|cpp|h|hpp)$' - id: clang-tidy name: clang-tidy # Run through a wrapper that sanitizes unsupported linker flags in From fb22ad372246b00dd9e1e5ae9963d32859970292 Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Mon, 10 Aug 2026 16:08:11 +0100 Subject: [PATCH 2/2] Use faster copyright fix hook --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 13cf99589f..7bf7f6222d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,11 +14,6 @@ repos: - repo: local hooks: - - id: copyright-fix - name: //:copyright-fix - entry: bazel run //:copyright-fix - language: system - pass_filenames: false - id: format-fix name: //:format.fix entry: bazel run //:format.fix @@ -44,3 +39,8 @@ repos: tests/| score/ ) + - repo: https://github.com/eclipse-score/tools + rev: 7694bf823421b5542cd2f45239b8bdf205dbface + hooks: + - id: copyright + exclude: ^.github/