1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/bin/sh
ERROR=0
if [ $# != 1 ]; then
SRCDIR=$(dirname "$0")/..
else
SRCDIR=$1
fi
echo "Checking with pycodestyle"
pycodestyle --ignore=W503,W606 "$SRCDIR"/*.py "$SRCDIR"/*/*.py || ERROR=$((ERROR + 1))
echo "Checking with flake8"
flake8 "$SRCDIR" || ERROR=$((ERROR + 2))
echo "Checking with doc8"
doc8 "$SRCDIR"/docs --ignore-path "$SRCDIR"/docs/_build --ignore D000 || ERROR=$((ERROR + 4))
echo "Checking with shellcheck"
shellcheck "$SRCDIR"/kas-container \
"$SRCDIR"/scripts/release.sh \
"$SRCDIR"/scripts/checkcode.sh \
"$SRCDIR"/scripts/build-container.sh \
"$SRCDIR"/scripts/reproduce-container.sh \
"$SRCDIR"/container-entrypoint || ERROR=$((ERROR + 8))
exit $ERROR
|