You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/10/08 18:00:57 UTC

[GitHub] [incubator-hudi] leesf opened a new pull request #945: [HUDI-296] Explore use of spotless to auto fix formatting errors

leesf opened a new pull request #945: [HUDI-296] Explore use of spotless to auto fix formatting errors
URL: https://github.com/apache/incubator-hudi/pull/945
 
 
   see jira: https://jira.apache.org/jira/projects/HUDI/issues/HUDI-296
   
   The main changes are described below:
   [1]. Add [spotless plugin](https://github.com/diffplug/spotless/tree/master/plugin-maven) to the project by reference to the usage of [jrtom](https://github.com/jrtom/jung/blob/b3a2461b97bb3ab40acc631e21feef74976489e4/pom.xml#L187-L208) and [avro](https://github.com/apache/avro/blob/8026c8ffe4ef67ab419dba73910636bf2c1a691c/lang/java/pom.xml#L307-L334). We would run `mvn spotless:check` to check style and `mvn spotless:apply` to fix style errors. 
   [2]. Change the base of eclipse-java-google-style.xml to https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml and have some minor modifications.
   [3]. Change max property of LineLength in checkstyle.xml for the lack of strict limit of [eclipse-java-google-style.xml](https://stackoverflow.com/questions/12789116/eclipse-formatter-is-not-strict)
   [4]. Add `SuppressionFilter` module to handle [violation](https://github.com/checkstyle/checkstyle/issues/3899) between checkstyle plugin and eclipse-java-google-style.xml.
   [5]. Add `AvoidNestedBlocks` [module](https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+AvoidNestedBlocks) to checkstyle.xml to handle indentation in [case statement](https://checkstyle.sourceforge.io/config_blocks.html#AvoidNestedBlocks).
   [6]. Add `RealtimeUnmergedRecordReader.java` to checkstyle-suppressions.xml to handle indentation violation between checkstyle plugin and eclipse-java-google-style.xml.
   
   CC @vinothchandar Please review when you get a chance. Thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services