Pre-commit Hooks
Pre-commit Hooks
Section titled “Pre-commit Hooks”Run architecture analysis before each commit to catch violations early.
Git hook script
Section titled “Git hook script”Create .git/hooks/pre-commit:
#!/bin/bash
echo "Running architecture analysis..."
if ! arxo analyze --quiet; then echo "❌ Architecture violations detected!" echo "Run: arxo analyze" exit 1fi
echo "✅ Architecture check passed"Make it executable:
chmod +x .git/hooks/pre-commitpre-commit framework
Section titled “pre-commit framework”Create .pre-commit-config.yaml:
repos: - repo: local hooks: - id: arxo name: Architecture Analysis entry: arxo analyze language: system pass_filenames: false always_run: trueInstall:
pip install pre-commitpre-commit installNext steps
Section titled “Next steps”- CI/CD Integration — Overview
- Configuration — Config and performance