From 42a9c4649bc8bdacde25e3a35b7620495e6d1003 Mon Sep 17 00:00:00 2001 From: Pawel Solyga Date: Mon, 18 May 2009 20:23:42 +0200 Subject: [PATCH] Invoke pylint from build script. Using --skip-pylint build script command line parameter you can skip pylint invocation. --- scripts/build.sh | 11 +++++++++++ scripts/pylint/do_pylint.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 5170812e..a54974dd 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -20,6 +20,17 @@ APP_FILES=${APP_FILES:-"${DEFAULT_APP_FILES}"} APP_DIRS=${APP_DIRS:-"${DEFAULT_APP_DIRS}"} ZIP_FILES=${ZIP_FILES:-"${DEFAULT_ZIP_FILES}"} + +if [ "$1" != "--skip-pylint" ]; then + cd pylint + bash do_pylint.sh --silent + if [ "$?" != "1" ] ; then + echo ' Build failed. Build script encountered pylint errors.' + exit 1 + fi + cd .. +fi + if [ -e $APP_FOLDER ] ; then cd $APP_FOLDER else diff --git a/scripts/pylint/do_pylint.sh b/scripts/pylint/do_pylint.sh index 99b48a56..2e3b4c94 100755 --- a/scripts/pylint/do_pylint.sh +++ b/scripts/pylint/do_pylint.sh @@ -36,7 +36,6 @@ PROJ_DIR=$(dirname "$0")/../.. PROJ_DIR=$(cd "$PROJ_DIR"; pwd) APP_DIR="${PROJ_DIR}/app" -# Note: We will add ghop and gsoc modules once there something in there CHECK_MODULES="soc reflistprop settings.py urls.py main.py" PYLINTRC=$(dirname "$0")/pylintrc @@ -60,3 +59,4 @@ do done pylint $SILENT_ARGS $ARGS $CHECK_MODULES_PATHS +exit $? \ No newline at end of file -- 2.11.4.GIT