cloud-init/tools/run-pylint
Scott Moser 16cfb37ac7 add --dummy-variables-rgx= param when calling pylint
new pylint in trusty complains about '_' variables if we don't do this.
This seems to be ok in older versions of pylint also.
2014-01-24 15:28:06 -05:00

27 lines
379 B
Bash
Executable File

#!/bin/bash
if [ $# -eq 0 ]; then
files=( bin/cloud-init $(find * -name "*.py" -type f) )
else
files=( "$@" );
fi
RC_FILE="pylintrc"
if [ ! -f $RC_FILE ]; then
RC_FILE="../pylintrc"
fi
cmd=(
pylint
--rcfile=$RC_FILE
--disable=R
--disable=I
--dummy-variables-rgx="_"
"${files[@]}"
)
echo -e "\nRunning pylint:"
echo "${cmd[@]}"
"${cmd[@]}"