aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2017-08-15 13:59:00 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2017-08-15 13:59:00 -0700
commit3f958a99921d149fb9fdf7ba7e78957afdad1405 (patch)
treeae2887b8cc2b6af8b0819656610df6344016b7c8 /project
parentcba826d00173a945b0c9a7629c66e36fa73b723e (diff)
[SPARK-21731][BUILD] Upgrade scalastyle to 0.9.
This version fixes a few issues in the import order checker; it provides better error messages, and detects more improper ordering (thus the need to change a lot of files in this patch). The main fix is that it correctly complains about the order of packages vs. classes. As part of the above, I moved some "SparkSession" import in ML examples inside the "$example on$" blocks; that didn't seem consistent across different source files to start with, and avoids having to add more on/off blocks around specific imports. The new scalastyle also seems to have a better header detector, so a few license headers had to be updated to match the expected indentation. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #18943 from vanzin/SPARK-21731.
Diffstat (limited to 'project')
-rw-r--r--project/SparkBuild.scala4
-rw-r--r--project/plugins.sbt2
2 files changed, 3 insertions, 3 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 371a171aa9..7565e14c9b 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -30,7 +30,7 @@ import sbtunidoc.Plugin.UnidocKeys.unidocGenjavadocVersion
import com.simplytyped.Antlr4Plugin._
import com.typesafe.sbt.pom.{PomBuild, SbtPomKeys}
import com.typesafe.tools.mima.plugin.MimaKeys
-import org.scalastyle.sbt.ScalastylePlugin._
+import org.scalastyle.sbt.ScalastylePlugin.autoImport._
import org.scalastyle.sbt.Tasks
import spray.revolver.RevolverPlugin._
@@ -116,7 +116,7 @@ object SparkBuild extends PomBuild {
lazy val scalaStyleRules = Project("scalaStyleRules", file("scalastyle"))
.settings(
- libraryDependencies += "org.scalastyle" %% "scalastyle" % "0.8.0"
+ libraryDependencies += "org.scalastyle" %% "scalastyle" % "0.9.0"
)
lazy val scalaStyleOnCompile = taskKey[Unit]("scalaStyleOnCompile")
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 2b49c297ff..f67e0a14a8 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -8,7 +8,7 @@ addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.1.0")
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2")
// need to make changes to uptake sbt 1.0 support in "org.scalastyle" %% "scalastyle-sbt-plugin" % "0.9.0"
-addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
+addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.9.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.17")