4a14dc0aff
## What changes were proposed in this pull request? This PR proposes to check Java lint via SBT for Jenkins. It uses the SBT wrapper for checkstyle. I manually tested. If we build the codes once, running this script takes 2 mins at maximum in my local: Test codes: ``` Checkstyle failed at following occurrences: [error] Checkstyle error found in /.../spark/core/src/test/java/test/org/apache/spark/JavaAPISuite.java:82: Line is longer than 100 characters (found 103). [error] 1 issue(s) found in Checkstyle report: /.../spark/core/target/checkstyle-test-report.xml [error] Checkstyle error found in /.../spark/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java:84: Line is longer than 100 characters (found 115). [error] 1 issue(s) found in Checkstyle report: /.../spark/sql/hive/target/checkstyle-test-report.xml ... ``` Main codes: ``` Checkstyle failed at following occurrences: [error] Checkstyle error found in /.../spark/sql/core/src/main/java/org/apache/spark/sql/sources/v2/reader/InputPartition.java:39: Line is longer than 100 characters (found 104). [error] Checkstyle error found in /.../spark/sql/core/src/main/java/org/apache/spark/sql/sources/v2/reader/InputPartitionReader.java:26: Line is longer than 100 characters (found 110). [error] Checkstyle error found in /.../spark/sql/core/src/main/java/org/apache/spark/sql/sources/v2/reader/InputPartitionReader.java:30: Line is longer than 100 characters (found 104). ... ``` ## How was this patch tested? Manually tested. Jenkins build should test this. Author: hyukjinkwon <gurwls223@apache.org> Closes #21399 from HyukjinKwon/SPARK-22269.
46 lines
2 KiB
Scala
46 lines
2 KiB
Scala
addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1")
|
|
|
|
// sbt-checkstyle-plugin uses an old version of checkstyle. Match it to Maven's.
|
|
libraryDependencies += "com.puppycrawl.tools" % "checkstyle" % "8.2"
|
|
|
|
// checkstyle uses guava 23.0.
|
|
libraryDependencies += "com.google.guava" % "guava" % "23.0"
|
|
|
|
// need to make changes to uptake sbt 1.0 support in "com.eed3si9n" % "sbt-assembly" % "1.14.5"
|
|
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2")
|
|
|
|
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.3")
|
|
|
|
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.0")
|
|
|
|
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
|
|
|
|
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.17")
|
|
|
|
// sbt 1.0.0 support: https://github.com/AlpineNow/junit_xml_listener/issues/6
|
|
addSbtPlugin("com.alpinenow" % "junit_xml_listener" % "0.5.1")
|
|
|
|
// need to make changes to uptake sbt 1.0 support in "com.eed3si9n" % "sbt-unidoc" % "0.4.1"
|
|
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.3")
|
|
|
|
// need to make changes to uptake sbt 1.0 support in "com.cavorite" % "sbt-avro-1-7" % "1.1.2"
|
|
addSbtPlugin("com.cavorite" % "sbt-avro" % "0.3.2")
|
|
|
|
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
|
|
|
|
libraryDependencies += "org.ow2.asm" % "asm" % "5.1"
|
|
|
|
libraryDependencies += "org.ow2.asm" % "asm-commons" % "5.1"
|
|
|
|
// sbt 1.0.0 support: https://github.com/ihji/sbt-antlr4/issues/14
|
|
addSbtPlugin("com.simplytyped" % "sbt-antlr4" % "0.7.11")
|
|
|
|
// Spark uses a custom fork of the sbt-pom-reader plugin which contains a patch to fix issues
|
|
// related to test-jar dependencies (https://github.com/sbt/sbt-pom-reader/pull/14). The source for
|
|
// this fork is published at https://github.com/JoshRosen/sbt-pom-reader/tree/v1.0.0-spark
|
|
// and corresponds to commit b160317fcb0b9d1009635a7c5aa05d0f3be61936 in that repository.
|
|
// In the long run, we should try to merge our patch upstream and switch to an upstream version of
|
|
// the plugin; this is tracked at SPARK-14401.
|
|
|
|
addSbtPlugin("org.spark-project" % "sbt-pom-reader" % "1.0.0-spark")
|