]> git.scottworley.com Git - pinch/blobdiff - test.sh
Separate test and lint
[pinch] / test.sh
diff --git a/test.sh b/test.sh
index 5df81bfee091044ea4d44c23627e3ab5fca8afb7..16d9c053d0844b04010d6a6a2b5e8c757a0187a1 100755 (executable)
--- 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