aiborodin opened a new pull request, #13368:
URL: https://github.com/apache/iceberg/pull/13368

   The current block spacing code style, as described 
[here](https://iceberg.apache.org/contribute/#accessing-instance-variables), 
seems too verbose and unnecessary for many cases. In many simple cases, it's 
questionable if the code is more readable with the extra newline. For example, 
even in the doc example in 
[contributing.md](https://github.com/apache/iceberg/blob/444fb9518ce4437fd901d9d9442a415391ade295/site/docs/contribute.md?plain=1#L425):
   ```java
   // BAD: No newline separator after `if` block
     public static WriteBuilder write(OutputFile file) {
        if (file instanceof EncryptedOutputFile) {
           return write((EncryptedOutputFile) file);
        }
        return new WriteBuilder(file);
     }
   
     // GOOD: newline separator after `if` block
     public static WriteBuilder write(OutputFile file) {
        if (file instanceof EncryptedOutputFile) {
           return write((EncryptedOutputFile) file);
        }
        
        return new WriteBuilder(file);
     }
   ```
   
   Let's remove this and let developers and reviewers decide when to add an 
extra new line.
   If there are strong opinions on this, let's then enforce this code style 
using static analysis tools like checkstyle, spotless, etc. Rather than relying 
on the visibility of the guideline.
   
   This PR reverts changes in https://github.com/apache/iceberg/pull/12641.


-- 
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: issues-unsubscr...@iceberg.apache.org

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


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

Reply via email to