You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/23 09:32:52 UTC

[GitHub] [spark] LuciferYang commented on pull request #35949: [DONT MERGE] Enabled `ImportOrder` check of Java code

LuciferYang commented on pull request #35949:
URL: https://github.com/apache/spark/pull/35949#issuecomment-1076148330


   The `ImportOrder` check of Java is disabled now and there is a TODO:
   
   https://github.com/apache/spark/blob/4817b0189a1d3f37db784e62b1d8c6e3aef6921d/dev/checkstyle.xml#L156-L163
   
   I try to re-enable it and change the rule as follows:
   
   ```xml
        <module name="ImportOrder">
               <!-- simple imports -->
               <property name="separated" value="true"/>
               <property name="ordered" value="true"/>
               <property name="groups" value="/^javax?\./,scala,*,org.apache.spark"/>
               <!-- static imports -->
               <property name="option" value="bottom"/>
               <property name="staticGroups" value=""/>
               <property name="sortStaticImportsAlphabetically" value="true"/>
               <property name="separatedStaticGroups" value="true"/>
           </module>
   ```
   
   The `no-static imports` is consistent with scala code, the `static imports`  is an independent group after `no-static imports`, and it sorted by alphabetically.
   
   @srowen @dongjoon-hyun @HyukjinKwon I wonder if we need to complete this TODO ?
   
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org