Invoke pylint from build script.
Using --skip-pylint build script command line parameter you can skip pylint invocation.
--- a/scripts/build.sh Mon May 18 19:37:38 2009 +0200
+++ b/scripts/build.sh Mon May 18 20:23:42 2009 +0200
@@ -20,6 +20,17 @@
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
--- a/scripts/pylint/do_pylint.sh Mon May 18 19:37:38 2009 +0200
+++ b/scripts/pylint/do_pylint.sh Mon May 18 20:23:42 2009 +0200
@@ -36,7 +36,6 @@
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 @@
done
pylint $SILENT_ARGS $ARGS $CHECK_MODULES_PATHS
+exit $?
\ No newline at end of file