diff options
author | Dongjoon Hyun <dongjoon@apache.org> | 2016-03-10 15:57:22 -0800 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2016-03-10 15:57:22 -0800 |
commit | 91fed8e9c57764eca9463d129ecd68196db7f566 (patch) | |
tree | b06c678dc15258af92116019760e6b9c98d81c2d /repl/scala-2.10/src/main | |
parent | 81d48532d954a8aea28d7e1fb3aa32a78c708b63 (diff) | |
download | spark-91fed8e9c57764eca9463d129ecd68196db7f566.tar.gz spark-91fed8e9c57764eca9463d129ecd68196db7f566.tar.bz2 spark-91fed8e9c57764eca9463d129ecd68196db7f566.zip |
[SPARK-3854][BUILD] Scala style: require spaces before `{`.
## What changes were proposed in this pull request?
Since the opening curly brace, '{', has many usages as discussed in [SPARK-3854](https://issues.apache.org/jira/browse/SPARK-3854), this PR adds a ScalaStyle rule to prevent '){' pattern for the following majority pattern and fixes the code accordingly. If we enforce this in ScalaStyle from now, it will improve the Scala code quality and reduce review time.
```
// Correct:
if (true) {
println("Wow!")
}
// Incorrect:
if (true){
println("Wow!")
}
```
IntelliJ also shows new warnings based on this.
## How was this patch tested?
Pass the Jenkins ScalaStyle test.
Author: Dongjoon Hyun <dongjoon@apache.org>
Closes #11637 from dongjoon-hyun/SPARK-3854.
Diffstat (limited to 'repl/scala-2.10/src/main')
-rw-r--r-- | repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkILoop.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkILoop.scala b/repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkILoop.scala index 22749c4609..2a8fa45e3c 100644 --- a/repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkILoop.scala +++ b/repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkILoop.scala @@ -169,7 +169,7 @@ class SparkILoop( } - private def sparkCleanUp(){ + private def sparkCleanUp() { echo("Stopping spark context.") intp.beQuietDuring { command("sc.stop()") |