Skip to content

chore: run hotspots delta check in pre-commit hook - #197

Open
stephenc222 wants to merge 1 commit into
mainfrom
chore/pre-commit-hotspots-check
Open

stephenc222 wants to merge 1 commit into
mainfrom
chore/pre-commit-hotspots-check

Conversation

@stephenc222

Copy link
Copy Markdown
Contributor

Summary

  • Adds a hotspots analyze . --mode delta --policy --format text step to .githooks/pre-commit, alongside the existing cargo fmt/clippy/test steps — dogfoods the tool on its own repo at commit time.
  • Uses the exact invocation hotspots init --hooks already recommends (its own official hook template), just wired into the existing local pre-commit hook instead of a separate pre-push/.pre-commit-config.yaml setup, matching this repo's existing hook mechanism (.githooks/, activated via make install-hooks).
  • No baseline snapshot exists for commit history by default, so on a machine without one yet, policy evaluation is silently skipped (tool's own documented behavior) rather than failing the commit — verified locally.

Test plan

  • Ran the updated hook directly: fmt, clippy, 549 unit tests, and the new hotspots analyze step all pass
  • Committed through the real hook (not bypassed) to confirm it doesn't block a normal commit

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
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