Skip to content

ci: install clang-format from the pre-commit mirror - #59

Merged
adriencaccia merged 1 commit into
mainfrom
ci/clang-format-mirror
Nov 26, 2026
Merged

adriencaccia merged 1 commit into
mainfrom
ci/clang-format-mirror

Conversation

@adriencaccia

@adriencaccia adriencaccia commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Switch the clang-format pre-commit hook from cpp-linter-hooks v0.8.1 to pre-commit/mirrors-clang-format v18.1.8.

cpp-linter-hooks v0.8.1 downloads clang-format the first time the hook runs, and its hook is not require_serial, so pre-commit runs several batches in parallel that download and move the same clang-format-18_linux-amd64 file into place: on a cold cache the loser fails with FileNotFoundError (both main runs 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-files passes and reformats no file.

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>
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; no actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Replaces cpp-linter/cpp-linter-hooks with pre-commit/mirrors-clang-format, pinned to v18.1.8.

  • The lint job gets clang-format from the pinned mirror.

Reviews (1) · Last reviewed commit: "ci: install clang-format from the pre-co..." · Reviewed by Greptile

@codspeed

codspeed Bot commented Nov 26, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 32.03%

3 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ Unable to measure the execution of 40 benchmarks

These benchmarks measured no execution time, so their results are not comparable and count as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

⚠️ 21 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 1 improved benchmark
✅ 461 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Walltime BM_memcpy[8192] 608.7 ns 461 ns +32.03%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ci/clang-format-mirror (ca270a4) with main (35818bf)

Open in CodSpeed

@adriencaccia
adriencaccia merged commit 88fe2a9 into main Nov 26, 2026
35 checks passed
@adriencaccia
adriencaccia deleted the ci/clang-format-mirror branch November 26, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant