diff options
author | Dongjoon Hyun <dongjoon@apache.org> | 2016-04-24 20:40:03 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-04-24 20:40:03 -0700 |
commit | d34d6503786bbe429c10ddb1879519cc9bd709b6 (patch) | |
tree | 885752ae5137e5a2f87dd8802c2e789ea271ee77 /dev | |
parent | d0ca5797a8fc55a3046cdfad8860ba3a29f72b51 (diff) | |
download | spark-d34d6503786bbe429c10ddb1879519cc9bd709b6.tar.gz spark-d34d6503786bbe429c10ddb1879519cc9bd709b6.tar.bz2 spark-d34d6503786bbe429c10ddb1879519cc9bd709b6.zip |
[SPARK-14868][BUILD] Enable NewLineAtEofChecker in checkstyle and fix lint-java errors
## What changes were proposed in this pull request?
Spark uses `NewLineAtEofChecker` rule in Scala by ScalaStyle. And, most Java code also comply with the rule. This PR aims to enforce the same rule `NewlineAtEndOfFile` by CheckStyle explicitly. Also, this fixes lint-java errors since SPARK-14465. The followings are the items.
- Adds a new line at the end of the files (19 files)
- Fixes 25 lint-java errors (12 RedundantModifier, 6 **ArrayTypeStyle**, 2 LineLength, 2 UnusedImports, 2 RegexpSingleline, 1 ModifierOrder)
## How was this patch tested?
After the Jenkins test succeeds, `dev/lint-java` should pass. (Currently, Jenkins dose not run lint-java.)
```bash
$ dev/lint-java
Using `mvn` from path: /usr/local/bin/mvn
Checkstyle checks passed.
```
Author: Dongjoon Hyun <dongjoon@apache.org>
Closes #12632 from dongjoon-hyun/SPARK-14868.
Diffstat (limited to 'dev')
-rw-r--r-- | dev/checkstyle.xml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dev/checkstyle.xml b/dev/checkstyle.xml index b66dca9041..3de6aa91dc 100644 --- a/dev/checkstyle.xml +++ b/dev/checkstyle.xml @@ -64,6 +64,8 @@ <property name="message" value="No trailing whitespace allowed."/> </module> + <module name="NewlineAtEndOfFile"/> + <module name="TreeWalker"> <module name="OuterTypeFilename"/> <module name="IllegalTokenText"> |