2017-06-28 14:48:42 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
ERROR=0
|
|
|
|
|
2020-06-15 23:03:03 +02:00
|
|
|
if [ $# != 1 ]; then
|
|
|
|
echo "Error: Please provide a path as the argument to this script!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-11-07 16:18:24 +01:00
|
|
|
echo "Checking with pycodestyle"
|
2021-01-29 20:58:11 +01:00
|
|
|
pycodestyle --ignore=W503,W606 "$1"/*.py "$1"/*/*.py || ERROR=$((ERROR + 1))
|
2017-06-28 14:48:42 +02:00
|
|
|
|
2018-12-07 09:41:20 +01:00
|
|
|
echo "Checking with flake8"
|
2021-01-29 20:58:11 +01:00
|
|
|
flake8 "$1" || ERROR=$((ERROR + 2))
|
2018-12-07 09:41:20 +01:00
|
|
|
|
2017-06-28 14:48:46 +02:00
|
|
|
echo "Checking with doc8"
|
2021-01-29 20:58:11 +01:00
|
|
|
doc8 "$1"/docs --ignore-path "$1"/docs/_build || ERROR=$((ERROR + 4))
|
2017-06-28 14:48:46 +02:00
|
|
|
|
2020-06-29 14:25:17 +02:00
|
|
|
echo "Checking with shellcheck"
|
2022-01-10 12:39:43 +01:00
|
|
|
shellcheck "$1"/kas-container "$1"/scripts/release.sh "$1"/scripts/checkcode.sh "$1"/container-entrypoint || ERROR=$((ERROR + 8))
|
2020-06-29 14:25:17 +02:00
|
|
|
|
2017-06-28 14:48:42 +02:00
|
|
|
exit $ERROR
|