aboutsummaryrefslogtreecommitdiff
path: root/dev/lint-python
diff options
context:
space:
mode:
Diffstat (limited to 'dev/lint-python')
-rwxr-xr-xdev/lint-python43
1 files changed, 6 insertions, 37 deletions
diff --git a/dev/lint-python b/dev/lint-python
index 477ac0ef6d..63487043a5 100755
--- a/dev/lint-python
+++ b/dev/lint-python
@@ -60,22 +60,6 @@ export "PYTHONPATH=$SPARK_ROOT_DIR/dev/pylint"
export "PYLINT_HOME=$PYTHONPATH"
export "PATH=$PYTHONPATH:$PATH"
-# if [ ! -d "$PYLINT_HOME" ]; then
-# mkdir "$PYLINT_HOME"
-# # Redirect the annoying pylint installation output.
-# easy_install -d "$PYLINT_HOME" pylint==1.4.4 &>> "$PYLINT_INSTALL_INFO"
-# easy_install_status="$?"
-#
-# if [ "$easy_install_status" -ne 0 ]; then
-# echo "Unable to install pylint locally in \"$PYTHONPATH\"."
-# cat "$PYLINT_INSTALL_INFO"
-# exit "$easy_install_status"
-# fi
-#
-# rm "$PYLINT_INSTALL_INFO"
-#
-# fi
-
# There is no need to write this output to a file
#+ first, but we do so so that the check status can
#+ be output before the report, like with the
@@ -92,12 +76,13 @@ fi
if [ "$lint_status" -ne 0 ]; then
echo "PEP8 checks failed."
cat "$PEP8_REPORT_PATH"
+ rm "$PEP8_REPORT_PATH"
+ exit "$lint_status"
else
echo "PEP8 checks passed."
+ rm "$PEP8_REPORT_PATH"
fi
-rm "$PEP8_REPORT_PATH"
-
# Check that the documentation builds acceptably, skip check if sphinx is not installed.
if hash "$SPHINXBUILD" 2> /dev/null; then
cd python/docs
@@ -110,29 +95,13 @@ if hash "$SPHINXBUILD" 2> /dev/null; then
echo "re-running make html to print full warning list"
make clean
SPHINXOPTS="-a" make html
+ rm "$SPHINX_REPORT_PATH"
+ exit "$lint_status"
else
echo "pydoc checks passed."
+ rm "$SPHINX_REPORT_PATH"
fi
- rm "$SPHINX_REPORT_PATH"
cd ../..
else
echo >&2 "The $SPHINXBUILD command was not found. Skipping pydoc checks for now"
fi
-
-
-# for to_be_checked in "$PATHS_TO_CHECK"
-# do
-# pylint --rcfile="$SPARK_ROOT_DIR/python/pylintrc" $to_be_checked >> "$PYLINT_REPORT_PATH"
-# done
-
-# if [ "${PIPESTATUS[0]}" -ne 0 ]; then
-# lint_status=1
-# echo "Pylint checks failed."
-# cat "$PYLINT_REPORT_PATH"
-# else
-# echo "Pylint checks passed."
-# fi
-
-# rm "$PYLINT_REPORT_PATH"
-
-exit "$lint_status"