List of git hooks:
- pre-commit: this hook runs
flake8
andpydocstyle
lints on modified files (that are staged). It is possible to change ignore rules list, so it would ignore different rules than currently set. And it is also possible to specify which checks to run (e.g run onlyflake8
). - prepare-commit-message: prepends empty commit message with
[BRANCH] BRANCH_NAME
pattern. Inhooks_cfg.py
, it is possible to define branch names that should ignore this feature.
Copy contents to your .git/hooks directory
. hooks_cfg.py checks_cfg
can be modified in order to run different checks or with different rules.
Also make sure hooks are executable.