diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-03-11 18:56:01 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-03-11 18:56:08 +0100 |
commit | 673615267436f4dc23ed0fad2fdfef7765908d27 (patch) | |
tree | be76542362e514b2e53f4a189d398342d69d79e4 /check | |
parent | 5b4aa1dd8fe6d52392c127be8ca53d54796255bc (diff) |
Use one script instead of three for tests etc.
Diffstat (limited to 'check')
-rwxr-xr-x | check | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -0,0 +1,42 @@ +#!/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 $* + nosetests3 $* + ;; + "coverage") + #nose2-3 --with-coverage --coverage-report=term \ + # --log-level=ERROR -B --log-capture $* + nosetests3 --with-coverage --cover-erase --cover-package=lesana $* + ;; + "qa") + flake8 --select=E,F,W,C90,E123 --ignore=W503 . + isort --check-only --diff . + doc8 . + ;; + "typecheck") + mypy lesana + ;; + "static") + bandit --recursive --number=3 -lll -iii . + ;; + *) + echo "No such subcommand $SUBCMD" + ;; +esac |