]> git.scottworley.com Git - nix-env-apps/blob - test.sh
Set the window title
[nix-env-apps] / test.sh
1 #!/bin/sh
2
3 set -e
4
5 find . -name build -prune -o -name dist -prune -o -name '*.py' -print0 |
6 xargs -0 mypy --strict --ignore-missing-imports --no-warn-unused-ignores
7
8 if [ "$1" = lint ];then
9
10 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
11
12 formatting_needs_fixing=$(
13 find . -name '*.py' -print0 |
14 xargs -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
15 )
16 if [ -n "$formatting_needs_fixing" ];then
17 echo "Formatting needs fixing:"
18 echo "$formatting_needs_fixing"
19 exit 1
20 fi
21
22 fi