summaryrefslogtreecommitdiff
path: root/dev-run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dev-run.sh')
-rwxr-xr-xdev-run.sh41
1 files changed, 35 insertions, 6 deletions
diff --git a/dev-run.sh b/dev-run.sh
index 7fb3699..51a4cbb 100755
--- a/dev-run.sh
+++ b/dev-run.sh
@@ -1,14 +1,43 @@
#!/bin/bash
echo "Checking package"
-mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/tmp/ src/soc_collector/*.py || exit 1
-black --line-length 120 src/soc_collector/*.py # || exit 1
-pylint --max-line-length 120 src/soc_collector/*.py # || exit 1
+
+which mypy > /dev/null
+if [ $? -eq 0 ]
+then
+ mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/tmp/ src/soc_collector/*.py || exit 1
+fi
+
+which black > /dev/null
+if [ $? -eq 0 ]
+then
+ black --line-length 120 src/soc_collector/*.py # || exit 1
+fi
+
+which pylint > /dev/null
+if [ $? -eq 0 ]
+then
+ pylint --max-line-length 120 src/soc_collector/*.py # || exit 1
+fi
echo "Checking tests"
-mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/tmp/ tests/*.py # || exit 1
-black --line-length 120 tests/*.py # || exit 1
-pylint --disable R0801 --max-line-length 120 tests/*.py # || exit 1
+which mypy > /dev/null
+if [ $? -eq 0 ]
+then
+ mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/tmp/ tests/*.py || exit 1
+fi
+
+which black > /dev/null
+if [ $? -eq 0 ]
+then
+ black --line-length 120 tests/*.py # || exit 1
+fi
+
+which pylint > /dev/null
+if [ $? -eq 0 ]
+then
+ pylint --max-line-length 120 tests/*.py # || exit 1
+fi
# Stop the containers
docker-compose down --remove-orphans