Skip to content

Adopt the TapHouse pre-commit clang-format hook#36

Merged
tap merged 1 commit into
mainfrom
claude/handoff-review-planning-nkc5q4
Jul 20, 2026
Merged

Adopt the TapHouse pre-commit clang-format hook#36
tap merged 1 commit into
mainfrom
claude/handoff-review-planning-nkc5q4

Conversation

@tap

@tap tap commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Adopts the canonical TapHouse pre-commit config so a git commit formats staged C/C++ with the same pinned clang-format the CI gate uses — no more format-only CI failures reachable locally.

What

  • .pre-commit-config.yaml synced from TapHouse — pins pre-commit/mirrors-clang-format at v18.1.3, scoped to C/C++, excluding third_party/.
  • ci.yml — the clang-format job now runs pre-commit run --all-files instead of an apt-installed clang-format-18 over an explicit file list, so local and CI share one version and one file scope.
  • scripts/book_figures_trace.cpp — formatted. The broader scope caught it (a real source file, the book's figure trace dumper) that the old explicit list didn't cover.

Validation

The mirror's clang-format v18.1.3 is byte-identical to the apt clang-format-18 the old job used, so this is a no-op on already-formatted code (only book_figures_trace.cpp needed it). pre-commit run --all-files passes clean.

Notes

  • The drift job still pins tap/taphouse@v2; leaving it there is intentional (that ref doesn't check .pre-commit-config.yaml, so adding the file doesn't break it). Fully drift-guarding the new file means bumping to TapHouse v3 and re-syncing — a separate follow-up.
  • Companion to Add a canonical pre-commit clang-format config for the Tap family TapHouse#2 and the MuTap / MuTap-Max adoptions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TLE2rvptWxV8catE8vTvgx


Generated by Claude Code

Sync the canonical TapHouse .pre-commit-config.yaml (pins
pre-commit/mirrors-clang-format at v18.1.3, the version CI uses) so a
`git commit` formats staged C/C++ before it can be pushed, and switch the
ci.yml clang-format job from an apt-installed clang-format-18 over an explicit
file list to `pre-commit run --all-files`. Local and CI now share one
clang-format version AND one file scope (all C/C++ minus third_party) by
construction.

The broader scope caught scripts/book_figures_trace.cpp — a real source file
(the book's figure trace dumper) that the old explicit list didn't cover; it's
now formatted. Everything else was already clean.

The drift job still pins TapHouse@v2; bumping it to guard .pre-commit-config.yaml
too is a separate re-sync-to-v3 follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLE2rvptWxV8catE8vTvgx
@tap
tap merged commit b154a9f into main Jul 20, 2026
32 checks passed
@tap
tap deleted the claude/handoff-review-planning-nkc5q4 branch July 20, 2026 00:21
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.

2 participants