aboutsummaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2023-06-19 15:31:33 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2023-06-19 15:31:33 +0200
commitbf66286309fedc6f0a92d0cd9681d4c6484f30d9 (patch)
tree9f473110e128353957124f54fc90f292c632efa9 /check
Project skeleton
Diffstat (limited to 'check')
-rwxr-xr-xcheck43
1 files changed, 43 insertions, 0 deletions
diff --git a/check b/check
new file mode 100755
index 0000000..331883f
--- /dev/null
+++ b/check
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+if [ $# -lt 1 ]
+then
+ $0 coverage
+ $0 typecheck
+ $0 qa
+ exit 0
+fi
+
+export PYTHONDEVMODE=1
+
+SUBCMD=$1
+shift 1
+
+case $SUBCMD in
+ "tests")
+ nose2-3 $COVER_OPT --log-level=ERROR -B --log-capture $*
+ ;;
+ "coverage")
+ nose2-3 --with-coverage --coverage-report=term \
+ --log-level=ERROR -B --log-capture $*
+ ;;
+ "qa")
+ flake8 --select=E,F,W,C90,E123 --ignore=W503 .
+ isort --check-only --diff .
+ if which doc8
+ then
+ doc8 .
+ fi
+ ;;
+ "typecheck")
+ mypy kerbana
+ ;;
+ "static")
+ bandit --recursive --number=3 -lll -iii .
+ ;;
+ *)
+ echo "No such subcommand $SUBCMD"
+ ;;
+esac