]> git.scottworley.com Git - paperdoorknob/blame - test.sh
Handle Unicode characters ≈ and ◁
[paperdoorknob] / test.sh
CommitLineData
92b11a10
SW
1#!/bin/sh
2
3set -e
4
5find . -name build -prune -o -name dist -prune -o -name '*.py' -print0 |
6 xargs -0 mypy --strict --ignore-missing-imports --no-warn-unused-ignores
7
8find . -name '*_test.py' -print0 | xargs -0 -r -n1 python3
9
10if [ "$1" = lint ];then
11
12 find . -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
13
14 formatting_needs_fixing=$(
15 find . -name '*.py' -print0 |
16 xargs -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
17 )
18 if [ -n "$formatting_needs_fixing" ];then
19 echo "Formatting needs fixing:"
20 echo "$formatting_needs_fixing"
21 exit 1
22 fi
23
24fi