You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/06/25 06:31:10 UTC

[GitHub] [iceberg] nastra commented on pull request #2732: Properly format code in arrow project

nastra commented on pull request #2732:
URL: https://github.com/apache/iceberg/pull/2732#issuecomment-868259385


   Personally I would prefer enforcing style rules, otherwise you'll always have the problem that the code in the repo isn't formatted as defined by the formatting rules and people trying to contribute will format their cause (using keyboard shortcuts due to muscle memory as in my case) and cause more whitespace changes than they intend to do. 
   
   The problem however with e.g. `checkstyle:check` is that it tells you when the format isn't what it expects it to be, but you still have to apply formatting manually.
    
   On the nessie project we're usign [spotless](https://github.com/diffplug/spotless) which allows to `check` but also has `apply`, which just auto-formats the code (see also https://github.com/diffplug/spotless/tree/main/plugin-maven) according to the style guide.
   
   One of the problems that we were facing is that you'd like to have Eclipse / IntelliJ / cmd line apply the exact same code style and that seems to be the easiest with google-java-format which isn't everybody's favorite, but produces consistent formatting results.
   
   Personally I stopped caring about the differences of different style rules. All I care about is that those can be enforced and easily applied via cmd line + IDE. Other programming languages (Go for example) solved this in the language and saved a huge amount of discussion hours among devs :)
   
   If there's an interest in using `spotless` in Iceberg, then I would be willing to provide a PR.
   
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org