[SPARK-7940] Enforce whitespace checking for DO, TRY, CATCH, FINALLY, MATCH, LARROW, RARROW in style checker.

…

Author: Reynold Xin <rxin@databricks.com>

Closes #6491 from rxin/more-whitespace and squashes the following commits:

f6e63dc [Reynold Xin] [SPARK-7940] Enforce whitespace checking for DO, TRY, CATCH, FINALLY, MATCH, LARROW, RARROW in style checker.

(cherry picked from commit 94f62a4979)
Signed-off-by: Reynold Xin <rxin@databricks.com>
This commit is contained in:
Reynold Xin 2015-05-29 13:38:37 -07:00
parent e549874c33
commit f40605f064
9 changed files with 13 additions and 15 deletions

View file

@ -331,12 +331,11 @@ class SendingConnection(val address: InetSocketAddress, selector_ : Selector,
channel.connect(address)
logInfo("Initiating connection to [" + address + "]")
} catch {
case e: Exception => {
case e: Exception =>
logError("Error connecting to " + address, e)
callOnExceptionCallbacks(e)
}
}
}
def finishConnect(force: Boolean): Boolean = {
try {

View file

@ -636,14 +636,13 @@ private[nio] class ConnectionManager(
if (message == null) throw new IOException("Error creating security message")
sendSecurityMessage(waitingConn.getRemoteConnectionManagerId(), message)
} catch {
case e: Exception => {
case e: Exception =>
logError("Error handling sasl client authentication", e)
waitingConn.close()
throw new IOException("Error evaluating sasl response: ", e)
}
}
}
}
private def handleServerAuthentication(
connection: Connection,

View file

@ -144,12 +144,12 @@
<check level="error" class="org.scalastyle.scalariform.SpaceAfterCommentStartChecker" enabled="true"></check>
<check level="error" class="org.scalastyle.scalariform.EnsureSingleSpaceBeforeTokenChecker" enabled="true">
<parameters>
<parameter name="tokens">ARROW, EQUALS</parameter>
<parameter name="tokens">ARROW, EQUALS, ELSE, TRY, CATCH, FINALLY, LARROW, RARROW</parameter>
</parameters>
</check>
<check level="error" class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker" enabled="true">
<parameters>
<parameter name="tokens">ARROW, EQUALS, COMMA, COLON, IF, WHILE, FOR</parameter>
<parameter name="tokens">ARROW, EQUALS, COMMA, COLON, IF, ELSE, DO, WHILE, FOR, MATCH, TRY, CATCH, FINALLY, LARROW, RARROW</parameter>
</parameters>
</check>
<check level="error" class="org.scalastyle.scalariform.NotImplementedErrorUsage" enabled="true"></check>