hotdog/scripts/lint
2020-11-08 10:50:09 +01:00

21 lines
412 B
Bash
Executable file

#!/bin/sh -e
if [ "$1" = '--fix' ]; then
(
set -x
black .
isort --profile black .
autoflake --in-place --recursive .
mypy . || : # ignore
)
exit
fi
error=0
(set -x; black --check .) || error=$?
(set -x; isort --profile black --check .) || error=$?
(set -x; autoflake --check --recursive . | uniq) || error=$?
(set -x; mypy .) || : # ignore
exit "$error"