summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rwxr-xr-xcheck33
1 files changed, 33 insertions, 0 deletions
diff --git a/check b/check
new file mode 100755
index 0000000..8f55de5
--- /dev/null
+++ b/check
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+if [ $# -lt 1 ]
+then
+ ./check coverage && \
+ ./check typecheck && \
+ ./check qa
+ exit $?
+fi
+
+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 .
+ ;;
+ "typecheck")
+ mypy hazwaz
+ ;;
+ *)
+ echo "No such subcommand $SUBCMD"
+ ;;
+esac