Skip to content

Add Claude pre-push hooks for clippy and doc checks#134

Merged
prestwich merged 1 commit intomainfrom
prestwich/claude-pre-push-hooks
Apr 8, 2026
Merged

Add Claude pre-push hooks for clippy and doc checks#134
prestwich merged 1 commit intomainfrom
prestwich/claude-pre-push-hooks

Conversation

@prestwich
Copy link
Copy Markdown
Member

Summary

  • Adds a Claude Code PreToolUse hook that runs before every git push
  • Runs format check, clippy (with -D warnings), and doc build (with -D warnings)
  • Clippy and rustdoc warnings are hard failures that block the push
  • Documents the enforced checks in CLAUDE.md

Files

  • .claude/hooks/pre-push.sh — the check script
  • .claude/settings.json — hook configuration
  • CLAUDE.md — updated with pre-push checks documentation

🤖 Generated with Claude Code

Adds a Claude Code hook that runs before every `git push`:
- cargo +nightly fmt --check
- cargo clippy with -D warnings
- RUSTDOCFLAGS="-D warnings" cargo doc

Clippy and doc warnings are hard failures that block the push.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@prestwich prestwich requested a review from a team as a code owner April 7, 2026 21:05
@prestwich prestwich merged commit 70ea2ad into main Apr 8, 2026
11 of 12 checks passed
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