hotdog/scripts/lint

20 lines
343 B
Text
Raw Normal View History

2020-11-01 16:31:37 +01:00
#!/bin/sh -e
if [ "$1" = '--fix' ]; then
2020-11-08 01:17:33 +01:00
(
set -x
black .
isort --profile black .
autoflake --in-place --recursive .
)
exit
2020-11-01 16:31:37 +01:00
fi
2020-11-08 01:17:33 +01:00
error=0
(set -x; black --check .) || error=$?
(set -x; isort --profile black --check .) || error=$?
(set -x; autoflake --check --recursive .) || error=$?
exit "$error"