Repository navigation
ci: install clang-format from the pre-commit mirror - #59
Conversation
cpp-linter-hooks v0.8.1 downloads a prebuilt clang-format-18 binary at run time, which now fails with FileNotFoundError, so lint fails on a cold pre-commit cache. The mirror installs the same clang-format 18.1.8 from PyPI at the pinned rev and reformats no file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryReplaces
Reviews (1) · Last reviewed commit: "ci: install clang-format from the pre-co..." · Reviewed by Greptile |
Merging this PR will improve performance by 32.03%3 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing |
Switch the clang-format pre-commit hook from cpp-linter-hooks
v0.8.1topre-commit/mirrors-clang-formatv18.1.8.cpp-linter-hooks
v0.8.1downloads clang-format the first time the hook runs, and its hook is notrequire_serial, so pre-commit runs several batches in parallel that download and move the sameclang-format-18_linux-amd64file into place: on a cold cache the loser fails withFileNotFoundError(bothmainruns since v3.0.0). Upstream fixed this in cpp-linter/cpp-linter-hooks#85 and cpp-linter/cpp-linter-hooks#306. The mirror installs clang-format 18.1.8 from PyPI when pre-commit builds the hook environment, so nothing is downloaded at run time;pre-commit run --all-filespasses and reformats no file.