diff --git a/GUIDE.md b/GUIDE.md index 74a9018..2601742 100644 --- a/GUIDE.md +++ b/GUIDE.md @@ -58,3 +58,10 @@ class Mycheat(Hack): Please, use `black` before doing a pull request, as it's the formatter the project use. + +On Linux, you can copy the git hook stored in [githooks/](./githooks) who check +the code, preventing any commit with bad formatting. + +```sh +$ cp githooks/* .git/hooks/ +``` diff --git a/githooks/pre-commit b/githooks/pre-commit new file mode 100755 index 0000000..77061ce --- /dev/null +++ b/githooks/pre-commit @@ -0,0 +1,3 @@ +#!/bin/sh + +python3 -m black --check .