map-machine/data/githooks/pre-commit
2021-09-08 03:55:16 +03:00

17 lines
396 B
Bash
Executable file

#!/bin/sh
echo "Checking code format with Black..."
if ! black -l 80 --check tests map_machine; then
black -l 80 --diff tests map_machine
echo "FAIL"
exit 1
fi
# Link with Flake8.
echo "Lint with Flake8..."
flake8 \
--max-line-length=80 \
--ignore=E203,W503,ANN002,ANN003,ANN101,ANN102 \
--exclude=work,precommit.py,tests/test_road.py \
|| { echo "FAIL"; exit 1; }