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/11/22 18:09:22 UTC

[GitHub] [iceberg] samredai commented on a change in pull request #3591: Docs: Update contributing with some additional Java style guidelines

samredai commented on a change in pull request #3591:
URL: https://github.com/apache/iceberg/pull/3591#discussion_r754522680



##########
File path: CONTRIBUTING.md
##########
@@ -45,4 +45,67 @@ on how to build iceberg locally.
 
 For Java styling, check out the section
 [Setting up IDE and Code Style](https://iceberg.apache.org/community/#setting-up-ide-and-code-style) from the
-documentation site. For Python, please use the tox command `tox -e format` to apply autoformatting to the project.
+documentation site.
+
+For Python, please use the tox command `tox -e format` to apply autoformatting to the project.
+
+### Java style guidelines
+
+#### Line breaks
+
+Continuation indents are 2 indents (= 4 spaces) from the start of the previous line.
+
+Try to break long lines at the same semantic level to make code more readable.
+* Don't use the same level of indentation for arguments to different methods

Review comment:
       The code block right below is the example. `doSomething` and the `ArgumentClass` constructor are two different methods and in the `BAD:` example you can see the arg `2` for `ArgumentClass` and the arg `3` for `doSomething` are both indented at the same level, making it hard at first glance to notice which argument belongs to which method.




-- 
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-unsubscribe@iceberg.apache.org

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