Proposal
Add pre-commit hooks to automate code quality and security checks before commits.
Current State
- No automated code quality checks
- Style and security issues caught only during PR reviews
- No standardized contribution workflow
Proposed Pre-commit Hooks
# .pre-commit-config.yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
hooks:
- id: ruff # Linting
- id: ruff-format # Code formatting
- repo: https://github.com/pre-commit/mirrors-mypy
hooks:
- id: mypy # Type checking
- repo: https://github.com/PyCQA/bandit
hooks:
- id: bandit # Security scanning
- repo: https://github.com/pre-commit/pre-commit-hooks
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
Benefits
- ✅ Catches issues before commit (faster feedback)
- ✅ Consistent code style across contributors
- ✅ Automated security scanning
- ✅ Reduces PR review time
- ✅ Enforces best practices automatically
Proposal
Add pre-commit hooks to automate code quality and security checks before commits.
Current State
Proposed Pre-commit Hooks
Benefits