Skip to content

Add pre-commit hook#1437

Open
maebeale wants to merge 1 commit intomainfrom
maebeale/add-pre-commit-hook
Open

Add pre-commit hook#1437
maebeale wants to merge 1 commit intomainfrom
maebeale/add-pre-commit-hook

Conversation

@maebeale
Copy link
Collaborator

Summary

  • Adds bin/pre-commit hook with rubocop (staged .rb files only), brakeman security scan, debug statement detection, merge conflict marker detection, and secrets/env file blocking
  • Auto-installs via bin/setup

Test plan

  • Run bin/setup and verify .git/hooks/pre-commit is installed
  • Stage a file with binding.pry and verify commit is blocked
  • Stage a clean .rb file and verify rubocop + brakeman run

🤖 Generated with Claude Code

Runs on every commit:
- rubocop on staged .rb files only
- brakeman security scan
- checks for debug statements (binding.pry, byebug, etc.)
- checks for merge conflict markers
- blocks committing .env/secrets files

Hook is auto-installed via bin/setup.

Co-Authored-By: Claude Opus 4.6 <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