From aa5b4b50047573123db9f5b5c47989330a268846 Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Mon, 4 Aug 2014 16:57:42 -0400 Subject: [PATCH] [SPARK-2627] follow Spark bash style for if blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “then” goes on the same line as the opening “if”. --- dev/lint-python | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/dev/lint-python b/dev/lint-python index f8ca3072b8f89..9913313ab349c 100755 --- a/dev/lint-python +++ b/dev/lint-python @@ -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 @@ -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"