Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 797 Bytes

README.rst

File metadata and controls

16 lines (9 loc) · 797 Bytes

Git hooks implemented using python

List of git hooks:

  • pre-commit: this hook runs flake8 and pydocstyle 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 only flake8).
  • prepare-commit-message: prepends empty commit message with [BRANCH] BRANCH_NAME pattern. In hooks_cfg.py, it is possible to define branch names that should ignore this feature.

Usage

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.