You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by vi...@apache.org on 2019/11/25 19:36:32 UTC

[incubator-hudi] branch master updated: [HUDI-358] Add Java-doc and importOrder checkstyle rule (#1043)

This is an automated email from the ASF dual-hosted git repository.

vinoth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 212282c  [HUDI-358] Add Java-doc and importOrder checkstyle rule (#1043)
212282c is described below

commit 212282c8aaf623f451e3f72674ed4d3ed550602d
Author: 谢磊 <la...@163.com>
AuthorDate: Tue Nov 26 03:36:23 2019 +0800

    [HUDI-358] Add Java-doc and importOrder checkstyle rule (#1043)
    
    - import groups are separated by one blank line
    - org.apache.hudi.* at the top location
---
 style/checkstyle.xml | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/style/checkstyle.xml b/style/checkstyle.xml
index 7eab7b4..91f51c3 100644
--- a/style/checkstyle.xml
+++ b/style/checkstyle.xml
@@ -206,11 +206,6 @@
             <property name="allowedDistance" value="5"/>
         </module>
         -->
-        <module name="CustomImportOrder">
-            <property name="sortImportsInGroupAlphabetically" value="true"/>
-            <property name="separateLineBetweenGroups" value="true"/>
-            <property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
-        </module>
         <module name="UnusedImports"/>
         <module name="RedundantImport"/>
 
@@ -274,5 +269,31 @@
         </module>
 
         <module name="EmptyStatement" />
+
+        <!-- Checks for Java Docs. -->
+        <module name="JavadocStyle">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="JavadocType">
+            <property name="severity" value="info"/>
+            <property name="scope" value="protected"/>
+            <property name="allowMissingParamTags" value="true"/>
+        </module>
+
+        <!-- Checks for out of order import statements. -->
+        <module name="ImportOrder">
+            <property name="severity" value="info"/>
+            <property name="groups" value="org.apache.hudi,*,javax,java,scala"/>
+            <property name="separated" value="true"/>
+            <property name="sortStaticImportsAlphabetically" value="true"/>
+            <property name="option" value="bottom"/>
+            <property name="tokens" value="STATIC_IMPORT, IMPORT"/>
+            <message key="import.ordering"
+                     value="Import {0} appears after other imports that it should precede"/>
+        </module>
+
+        <!-- Checks for star import. -->
+        <module name="AvoidStarImport" />
+
     </module>
 </module>