PTU5KAS/scripts/checkcode.sh
Daniel Wagner e24f8cff7c scripts: Add flake8 checker
Add code and style checker flake8.

Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2018-12-07 09:56:08 +01:00

15 lines
308 B
Bash
Executable File

#!/bin/sh
ERROR=0
echo "Checking with pycodestyle"
pycodestyle --ignore=W503,W606 $1/*.py $1/*/*.py || ERROR=$(expr $ERROR + 1)
echo "Checking with flake8"
flake8 $1 || ERROR=$(expr $ERROR + 2)
echo "Checking with doc8"
doc8 $1/docs --ignore-path $1/docs/_build || ERROR=$(expr $ERROR + 4)
exit $ERROR