Skip to content

chore: pre-commit is the single git-hook entry point, bump hedron pin#183

Open
helly25 wants to merge 1 commit into
mainfrom
chore/20260518_single_entry_point
Open

chore: pre-commit is the single git-hook entry point, bump hedron pin#183
helly25 wants to merge 1 commit into
mainfrom
chore/20260518_single_entry_point

Conversation

@helly25
Copy link
Copy Markdown
Owner

@helly25 helly25 commented May 18, 2026

Summary

Two related cleanups from the #182 retrospective.

1. Single git-hook entry point

Today both pre-commit install and trunk actions install write to .git/hooks/pre-commit and .git/hooks/pre-pushlast installer wins, silently. Devs running both end up with one tool's hook disabled at random.

Resolution:

  • Move trunk's trunk-fmt-pre-commit and trunk-check-pre-push from actions.enabled to actions.disabled in .trunk/trunk.yaml.
  • Add a single trunk fmt delegate as a local hook in .pre-commit-config.yaml.
  • pre-commit owns the git hook; devs run pre-commit install once and trunk's formatters fire on every commit through the delegate.
  • CI's two jobs (pre-commit + trunk) are unchanged; both still run independently.

README's dev-setup paragraph updated to match.

2. Bump hedron_compile_commands pin

bazelmod/dev.MODULE.bazel was pinned at 6f0f6e4f (Apr 2024). Bump to abb61a68 (Aug 2025), which is current upstream main HEAD. The two intervening commits are pre-commit autoupdate merges only — no behavior change — but the pin should not drift further.

Test plan

  • CI green
  • After this lands, run pre-commit install once locally; git commit triggers trunk fmt via the new local hook without any trunk actions install step.

🤖 Generated with Claude Code

Two related cleanups from the #182 retrospective.

1) Single git-hook entry point.

Today both `pre-commit install` and `trunk actions install` write to
`.git/hooks/pre-commit` and `.git/hooks/pre-push` — last installer
wins, silently. Devs running both end up with one tool's hook
disabled at random.

Move trunk's `trunk-fmt-pre-commit` and `trunk-check-pre-push` from
`actions.enabled` to `actions.disabled` in .trunk/trunk.yaml, and
add a single `trunk fmt` delegate as a local hook in
.pre-commit-config.yaml. pre-commit owns the git hook; devs run
`pre-commit install` once and trunk's formatters fire on every
commit through the delegate. CI's two jobs (`pre-commit` + `trunk`)
are unchanged; both still run independently.

README's dev-setup paragraph updated to match.

2) Bump hedron_compile_commands pin.

`bazelmod/dev.MODULE.bazel` was pinned at `6f0f6e4f` (Apr 2024).
Bump to `abb61a68` (Aug 2025) which is upstream main HEAD. The two
intervening commits are pre-commit autoupdate merges only — no
behavior change — but the pin should not drift further.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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