]> git.scottworley.com Git - pinch/blob - test.sh
cea63ba4ef47cf7c65dde3e09049ffde20638aa5
[pinch] / test.sh
1 #!/bin/sh
2
3 set -e
4
5 PARALLELISM=4
6
7 find . -name '*.py' -print0 | xargs -0 mypy --strict --ignore-missing-imports
8
9 find . -name '*_test.py' -print0 | xargs -0 -r -n1 python3
10
11 find . -name '*.py' -print0 | xargs -0 pylint --reports=n --persistent=n --ignore-imports=y -d invalid-name,missing-docstring
12
13 formatting_needs_fixing=$(
14 find . -name '*.py' -print0 |
15 xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
16 )
17 if [[ "$formatting_needs_fixing" ]];then
18 echo "Formatting needs fixing:"
19 echo "$formatting_needs_fixing"
20 exit 1
21 fi