Skip to content

Use pre-commit

Jon Banafato requested to merge pre-commit into master

pre-commit can be used to manage, distribute, and automatically run git hooks. Instead of requiring developers to remember to type things like tox -e format, we can instead run those same jobs for them.

This initial adoption of pre-commit moves the format step from tox to pre-commit. The line between pre-commit's job and tox's job is fuzzy. The line I've drawn in the sand right now is "anything that can be automatically fixed belongs to pre-commit, other checks belong to tox" with the reasoning that it should be as invisible as possible. This is up for discussion, but heavier jobs like the full test suite will not likely be run on every commit, and tox provides some additional power that pre-commit does not.

References #63.

Merge request reports