From 41f65391fe4506b72e12a17aaafed8f6b04d684a Mon Sep 17 00:00:00 2001 From: Adrien Cacciaguerra Date: Wed, 16 Sep 2026 13:25:38 -0400 Subject: [PATCH] ci: fix the clang-format hook failing to install cpp-linter-hooks installs clang-format with pip at hook runtime. v1.4.0 requires only pip>=20.3, which now fails to lay the wheel down: pip failed to install clang-format 22.1.2 PermissionError: [Errno 13] Permission denied: .../site-packages/clang_format/data/bin/clang-format Lint only stayed green while the prek cache survived; every cache miss rebuilt the hook environment and went red. v1.6.0 requires pip>=26.1 for exactly this reason. v1.6.0 also resolves the clang-format version from PyPI at run time instead of a static list, so pin it to the 22.1.2 the sources are already formatted with, keeping the version independent of what PyPI publishes next. Refs COD-3543 Co-Authored-By: Claude Opus 5 (1M context) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d8fbace64..c39411993 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,11 +22,11 @@ repos: - id: clippy args: [--all-targets, --, -D, warnings] - repo: https://github.com/cpp-linter/cpp-linter-hooks - rev: v1.4.0 + rev: v1.6.0 hooks: - id: clang-format files: ^crates/memtrack/src/ebpf/c/.*\.(c|h|bpf\.c)$ - args: [--style=file, -i] + args: [--style=file, -i, --version=22.1.2] - repo: local hooks: - id: init-worktree