Added pre-commit hook
This commit is contained in:
parent
c9700618f7
commit
5855c931ca
2 changed files with 24 additions and 2 deletions
11
.githooks/pre-commit
Executable file
11
.githooks/pre-commit
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# This hooks runs tests and checks if the linter doesn't hate you
|
||||
|
||||
# Linting
|
||||
printf "flake8....."
|
||||
make lint > /dev/null 2>&1 && printf "OK!\n" || { printf "Fail." && exit 1; }
|
||||
|
||||
# Running tests
|
||||
printf "pytest....."
|
||||
make test > /dev/null 2>&1 && printf "OK!\n" || { printf "Fail." && exit 1; }
|
||||
Reference in a new issue