Skip to content

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

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#13
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 review from Evalir and Fraser999 April 8, 2026 14:52
@prestwich prestwich merged commit d8aba3f into main Apr 8, 2026
6 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