GitHub user HyukjinKwon opened a pull request:
https://github.com/apache/spark/pull/21399
[SPARK-22269][BUILD] Run Java linter via SBT for Jenkins
## 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, which is done in Jenkins
ahead, running this script takes 2mins 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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HyukjinKwon/spark SPARK-22269
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/21399.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #21399
----
commit 15e4cf8d5d85a01c00ced6a1ffc3ed09b5e5b966
Author: hyukjinkwon <gurwls223@...>
Date: 2018-05-22T14:57:46Z
Run Java linter with Jenkins via SBT
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]