leesf edited a comment on issue #1208: [HUDI-304] Bring back spotless plugin
URL: https://github.com/apache/incubator-hudi/pull/1208#issuecomment-573539453
 
 
   > @leesf:
   > 
   > > > > Currently, when using "Reformat Code" and "Optimize Imports" in 
IntelliJ, the checkstyle would not pass, e.g. after reformatting the 
Indentation is 4 instead of 2, so it will fail. Seems like it has already 
happened before?
   > 
   > Few months back, IIRC, apart from one caveat related indentation for deep 
nesting fields (You can look at checkstyle-suppressions.xml, everything else 
used to be consistent between IntelliJ (Reformat/Optimize Imports) and 
checkstyle. I am pretty sure it got changed in the last few months. You can try 
Hudi 0.4.6/0.4.7 release branch.
   > 
   > One of the biggest issue has been if we do Optimize Import, compilation 
fails due to checkstyle settings. Can this be made consistent ?
   > 
   > Also, From the hudi website, 
https://hudi.incubator.apache.org/newsite-content/contributing#ide-setup, we 
mention :
   > 
   > "[Recommended] We have embraced the code style largely based on google 
format. Please setup your IDE with style files from here. These instructions 
have been tested on IntelliJ."
   > 
   > Is this still true given the changes we have done in checkstyle settings ? 
If checkstyle settings is not consistent with google format, then we need to 
fix the documentation and provide a intellij settings xml file.
   
   Hi @bvaradar After checking the hoodie-0.4.6 and hoodie-0.4.7 branch and 
runnig Reformat in IntelliJ, it still fails runing `mvn clean install 
-DskipTests` with indentation error. Could you please help me verify again?
   After modifying the checkstyle-suppressions.xml in hoodie-0.4.7 
(https://github.com/apache/incubator-hudi/blob/hoodie-0.4.7/style/checkstyle-suppressions.xml)
 to the following (mainly change the `HoodieLogFileCommand.java` to `.` in 
indentation checks)
   ```xml
   <suppressions>
     <!-- Impossible to resolve checkstyle indentation violation because of 
checkstyle bug -->
     <suppress checks="indentation" files="." lines="1-9999"/>
     <!-- Member Names expected to start with "_"  -->
     <suppress checks="naming" files="TestRecord.java" lines="1-9999"/>
   </suppressions>
   ```
   Reformat in IntelliJ and checkstyle.xml would play well together. Also I 
verify it in lastest master branch, it plays well too. So just modify the 
suppressions.xml file to get all make sense?
    
   As to the documentation, I think we need to document that developers could 
use checkstyle.xml file in style folder in checkstyle plugin and things will go 
well since the eclipse-java-google-style.xml is compatible with checkstyle.xml.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to