Skip to content

Commit

Permalink
[SPARK-2627] follow Spark bash style for if blocks
Browse files Browse the repository at this point in the history
“then” goes on the same line as the opening “if”.
  • Loading branch information
nchammas committed Aug 4, 2014
1 parent d0a83b9 commit aa5b4b5
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions dev/lint-python
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ PEP8_SCRIPT_REMOTE_PATH="https://raw.githubusercontent.com/jcrocholl/pep8/1.5.7/
curl --silent -o "$PEP8_SCRIPT_PATH" "$PEP8_SCRIPT_REMOTE_PATH"
curl_status=$?

if [ $curl_status -ne 0 ]
then
echo "Failed to download pep8.py from \"$PEP8_SCRIPT_REMOTE_PATH\"."
exit $curl_status
if [ $curl_status -ne 0 ]; then
echo "Failed to download pep8.py from \"$PEP8_SCRIPT_REMOTE_PATH\"."
exit $curl_status
fi


Expand All @@ -49,12 +48,11 @@ python $PEP8_SCRIPT_PATH ./python --exclude="cloudpickle.py" \
> "$PEP8_REPORT_PATH"
pep8_status=${PIPESTATUS[0]} #$?

if [ $pep8_status -ne 0 ]
then
echo "PEP 8 checks failed."
cat "$PEP8_REPORT_PATH"
else
echo "PEP 8 checks passed."
if [ $pep8_status -ne 0 ]; then
echo "PEP 8 checks failed."
cat "$PEP8_REPORT_PATH"
else
echo "PEP 8 checks passed."
fi

rm -f "$PEP8_REPORT_PATH"
Expand Down

0 comments on commit aa5b4b5

Please sign in to comment.