This repository has been archived on 2021-03-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
frank/.githooks/pre-commit

11 lines
306 B
Bash
Executable file

#!/bin/sh
#
# This hooks runs tests and checks if the linter doesn't hate you
# Linting
printf "black......"
make format > /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; }