Pre-Commit
A framework for managing and maintaining multi-language pre-commit hooks.
What is it used for here?
!
- Automatically runs linters, formatters, and tests before each commit
- Ensures code quality and formatting consistency on every commit
- Prevents committing code that doesn't meet project standards
How to use it?
!
How to add hooks
-
Edit the .pre-commit-config.yaml file and add the required hook. For example, to add Ruff:
-
After editing, run:
Used hooks
!
- ruff: linter and formatter
- mypy: type checker
- pytest: testing framework
- commitizen: commit message linter
Configuration
- All pre-commit hook settings are in .pre-commit-config.yaml.
For more details on configuration, see the pre-commit Documentation.