]> git.scottworley.com Git - pinch/blame - test.sh
Don't depend upon xdg
[pinch] / test.sh
CommitLineData
2f96f32a
SW
1#!/bin/sh
2
3set -e
4
5PARALLELISM=4
6
7find . -name '*.py' -print0 | xargs -0 mypy --strict --ignore-missing-imports
8
49d58bdf 9for test in tests/*;do
a2290fb1
SW
10 if [ ! -d "$test" ];then
11 "$test"
12 fi
49d58bdf
SW
13done
14
2f96f32a
SW
15find . -name '*_test.py' -print0 | xargs -0 -r -n1 python3
16
7fcc18a2 17find . -name '*.py' -print0 | xargs -0 pylint --reports=n --persistent=n --ignore-imports=y -d fixme,invalid-name,missing-docstring,subprocess-run-check,too-few-public-methods
2f96f32a
SW
18
19formatting_needs_fixing=$(
20 find . -name '*.py' -print0 |
21 xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
22)
23if [[ "$formatting_needs_fixing" ]];then
24 echo "Formatting needs fixing:"
25 echo "$formatting_needs_fixing"
26 exit 1
27fi