X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/b365b52416a5c3d79b96ca9401b5031db4bddba2..88af5903f7d0c6490a236167b6e07d831fc67a62:/test.sh diff --git a/test.sh b/test.sh index 5df81bf..16d9c05 100755 --- a/test.sh +++ b/test.sh @@ -15,14 +15,18 @@ done find . -name '*_test.py' -print0 | xargs -0 -r -n1 python3 -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 - -formatting_needs_fixing=$( - find . -name '*.py' -print0 | - xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -) -if [[ "$formatting_needs_fixing" ]];then - echo "Formatting needs fixing:" - echo "$formatting_needs_fixing" - exit 1 +if [ "$1" = lint ];then + + 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 + + formatting_needs_fixing=$( + find . -name '*.py' -print0 | + xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ) + if [[ "$formatting_needs_fixing" ]];then + echo "Formatting needs fixing:" + echo "$formatting_needs_fixing" + exit 1 + fi + fi