leesf commented on issue #1208: [HUDI-304] Bring back spotless plugin
URL: https://github.com/apache/incubator-hudi/pull/1208#issuecomment-573493705
 
 
   > Thanks @leesf . The current IDE setup steps 
(https://hudi.incubator.apache.org/newsite-content/contributing) is 
inconsistent with the style settings present in the repository.
   > 
   > We need to ensure the convention we enforce needs to be auto-settable in 
IDE (using IDE code-formatting options). For example : in IntelliJ, if we 
"Reformat Code" and "Optimize Imports", it should bring the code to a state 
where checkstyle needs to pass. This is how it used to be with minor caveats. 
Can we ensure we reach that state.
   > 
   > What we need is :
   > 
   > 1. As spotless relies on eclipse style config, make changes to eclipse 
style config to make it consistent with current checkstyle setting so that we 
don't end up with massive change
   > 2. Also provide corresponding intellij settings (there are many intellij 
users here :) ) which is again consistent with eclipse style settings enforced 
by spotless
   > 3. Update https://hudi.incubator.apache.org/newsite-content/contributing 
to reflect how to set code style. For e.g: We are no longer using vanilla 
google style (which has 120 char limit for line boundary whereas we need 200 
char limit) and so we cannot ask developers to use google code style directly.
   > 
   > Let me your thoughts on this ?
   
   Thanks for your comments.
   
   Sorry I would not get the point that The current IDE setup steps 
(https://hudi.incubator.apache.org/newsite-content/contributing) is 
inconsistent with the style settings present in the repository?
   1. 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?
   2. The rules introduced in eclipse-java-google-style.xml are compatible with 
rules in checkstyle.xml. 
   3. In my local dev, I use checkstyle plugin and the checkstyle.xml in 
(https://github.com/apache/incubator-hudi/tree/master/style), it plays well 
with spotless plugin(eclipse-java-google-style.xml) and 
checkstyle(checkstyle.xml). 
   Please correct me if I am wrong.

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