From 91fed8e9c57764eca9463d129ecd68196db7f566 Mon Sep 17 00:00:00 2001 From: Dongjoon Hyun Date: Thu, 10 Mar 2016 15:57:22 -0800 Subject: [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 Closes #11637 from dongjoon-hyun/SPARK-3854. --- scalastyle-config.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scalastyle-config.xml') diff --git a/scalastyle-config.xml b/scalastyle-config.xml index 64619d2108..37d2ecf48e 100644 --- a/scalastyle-config.xml +++ b/scalastyle-config.xml @@ -215,6 +215,14 @@ This file is divided into 3 sections: + + + \)\{ + + + -- cgit v1.2.3