void-filter Enterprise Git Hooks Framework¶
Code quality, formatting, linting, and license enforcement for polyglot repositories.
Architecture¶
┌─────────────────────────────────────────────────────────────┐
│ Git Event Triggers │
├──────────┬───────────┬────────────┬──────────┬──────────────┤
│pre-commit│commit-msg │prepare-msg │pre-push │post-checkout │
│pre-rebase│post-commit│post-merge │ │ │
└────┬─────┴─────┬─────┴──────┬─────┴────┬─────┴──────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌──────────┐ ┌──────────────┐
│ config/ │ │Tools/Git/│ │Tools/Git/│ │ Tools/Git/ │
│hooks.json│ │ Lint/ │ │ Headers/ │ │ Util/ │
└─────────┘ └─────────┘ └──────────┘ └──────────────┘
Hook Stages¶
| Hook | Trigger | Purpose | Blocks? |
|---|---|---|---|
pre-commit |
Before commit created | Format, lint, secrets detection | ✓ Yes |
commit-msg |
After message written | Conventional commit validation | ✓ Yes |
prepare-commit-msg |
Before editor opens | Auto-prefix ticket from branch | No |
post-commit |
After commit created | Notifications, metrics | No |
pre-push |
Before push executes | Run tests, block WIP to protected | ✓ Yes |
pre-rebase |
Before rebase starts | Protect main/release branches | ✓ Yes |
post-checkout |
After branch switch | Auto-install deps if lockfile changed | No |
post-merge |
After merge completes | Auto-install deps if lockfile changed | No |
Features¶
- Multi-language support Go, C++, Python, JavaScript, Shell
- Auto-formatting goimports, clang-format, ruff, prettier, shfmt
- Linting golangci-lint, cppcheck, ruff check, eslint, shellcheck
- License headers Auto-insert copyright headers per language
- Secrets detection Block commits containing API keys or tokens
- Conventional commits Enforce commit message standards
- Protected branches Block direct push/rebase on main/release
Quick Start¶
git clone <repo> && cd void-filter
./install.sh # Symlinks hooks into .git/hooks/
./setup.sh # Install formatter/linter dependencies
Documentation¶
- Setup Guide Installation and initial configuration
- Git Hooks Detailed hook reference
- Shell Enhancements Terminal productivity scripts
- Language Support Per-language formatter/linter config
- Configuration hooks.json and templates reference
- Maintenance Updating and troubleshooting