
name that seems to just say it will run pylint. Put the pep8 tool in a 'run-pep8' script.
41 lines
782 B
Bash
Executable File
41 lines
782 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ci_files='cloud*.py cloudinit/*.py cloudinit/config/*.py'
|
|
test_files=$(find tests -name "*.py")
|
|
def_files="$ci_files $test_files"
|
|
|
|
if [ $# -eq 0 ]; then
|
|
files=( )
|
|
for f in $def_files; do
|
|
[ -f "$f" ] || { echo "failed, $f not a file" 1>&2; exit 1; }
|
|
files[${#files[@]}]=${f}
|
|
done
|
|
else
|
|
files=( "$@" );
|
|
fi
|
|
|
|
cmd=(
|
|
pylint
|
|
--reports=n
|
|
--include-ids=y
|
|
--max-line-length=79
|
|
|
|
--disable=R
|
|
--disable=I
|
|
|
|
--disable=W0142 # Used * or ** magic
|
|
--disable=W0511 # TODO/FIXME note
|
|
--disable=W0702 # No exception type(s) specified
|
|
--disable=W0703 # Catch "Exception"
|
|
|
|
--disable=C0103 # Invalid name
|
|
--disable=C0111 # Missing docstring
|
|
|
|
"${files[@]}"
|
|
)
|
|
|
|
echo -e "\nRunning pylint:"
|
|
echo "${cmd[@]}"
|
|
"${cmd[@]}"
|
|
|