File: checkcode.sh

package info (click to toggle)
kas 5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,268 kB
  • sloc: python: 5,745; sh: 1,095; makefile: 210
file content (28 lines) | stat: -rwxr-xr-x 730 bytes parent folder | download | duplicates (2)
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