diff options
Diffstat (limited to 'pylint-build-scan.sh')
-rwxr-xr-x | pylint-build-scan.sh | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/pylint-build-scan.sh b/pylint-build-scan.sh index a4bff6bfc..cbaf972f0 100755 --- a/pylint-build-scan.sh +++ b/pylint-build-scan.sh @@ -15,43 +15,16 @@ PYLINT_RC_FILE_PATH="`cd $2/.. ; pwd`/dogtag.pylintrc" PYTHON_PACKAGE_DIR="$HOME_DIR`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`" -PYLINT_REPORT_PATH="`cd $HOME_DIR/../.. ; pwd`/pylint-report" - cd $PYTHON_PACKAGE_DIR FILES="pki/" +FILES="$FILES $HOME_DIR/usr/bin/pki" FILES="$FILES $HOME_DIR/usr/sbin/pkispawn" FILES="$FILES $HOME_DIR/usr/sbin/pkidestroy" FILES="$FILES $HOME_DIR/usr/sbin/pki-upgrade" FILES="$FILES $HOME_DIR/usr/sbin/pki-server" FILES="$FILES $HOME_DIR/usr/sbin/pki-server-upgrade" -rv=`pylint --rcfile=$PYLINT_RC_FILE_PATH $FILES >> $PYLINT_REPORT_PATH` - -status=$? - -#Excerpt from pylint man page -#OUTPUT STATUS CODE -# Pylint should leave with following status code: -# * 0 if everything went fine -# * 1 if a fatal message was issued -# * 2 if an error message was issued -# * 4 if a warning message was issued -# * 8 if a refactor message was issued -# * 16 if a convention message was issued -# * 32 on usage error -# -# status 1 to 16 will be bit-ORed so you can know which different categories has been issued by analysing pylint output status code - -result=0 -if [ $(($status&1)) -eq 1 ] || [ $(($status&2)) -eq 2 ] || [ $(($status&4)) -eq 4 ] -then - echo -e "\n===============================================================================\n" - echo -e " Pylint has reported errors or warnings in the python code.\n" - echo -e " The report generated can be viewed at $PYLINT_REPORT_PATH.\n" - echo -e " If the issues shown are false positives, re-build pki-core after marking them" - echo -e " ignored in the configuration file dogtag.pylintrc, in the source code. \n" - echo -e "===============================================================================\n" - result=1 -fi -exit $result +pylint --rcfile=$PYLINT_RC_FILE_PATH $FILES + +exit $? |