checkcode.sh: Abort if no path is provided
This ensures we don't try to check all python files in '/' if the argument to the checkcode.sh script is missed by accident. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
04e5a2487c
commit
f8067a449b
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
ERROR=0
|
ERROR=0
|
||||||
|
|
||||||
|
if [ $# != 1 ]; then
|
||||||
|
echo "Error: Please provide a path as the argument to this script!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Checking with pycodestyle"
|
echo "Checking with pycodestyle"
|
||||||
pycodestyle --ignore=W503,W606 $1/*.py $1/*/*.py || ERROR=$(expr $ERROR + 1)
|
pycodestyle --ignore=W503,W606 $1/*.py $1/*/*.py || ERROR=$(expr $ERROR + 1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user