home · contact · privacy
Re-structure whole code into more package-typical file modularity.
[plomtask] / scripts / pre-commit
index a053262bcb0c49ea34392c4b11a779e8fe2b4431..cab455311fff30eb454474b3ee840a28222bb0eb 100755 (executable)
@@ -1,6 +1,13 @@
 #!/bin/sh
 set -e
-python3 -m mypy task.py
-python3 -m flake8 task.py
-python3 -m pylint --good-names 'do_GET,do_POST' task.py
+for dir in $(echo '.' 'plomtask' 'tests'); do
+    echo "Running mypy on ${dir}/ …."
+    python3 -m mypy ${dir}/*.py
+    echo "Running flake8 on ${dir}/ …"
+    python3 -m flake8 ${dir}/*.py
+    echo "Running pylint on ${dir}/ …"
+    python3 -m pylint ${dir}/*.py
+done
+echo "Running unittest on tests/."
+python3 -m unittest tests/*.py
 exit 0