[ 
https://issues.apache.org/jira/browse/MNGSITE-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16996706#comment-16996706
 ] 

Karl Heinz Marbaise commented on MNGSITE-385:
---------------------------------------------

[~bmarwell] Please import the given code style into your IDE reformat your PR. 
Furthermore if you take a look into the rest of the code base you might see the 
differences....

> Code style should mention "else" style
> --------------------------------------
>
>                 Key: MNGSITE-385
>                 URL: https://issues.apache.org/jira/browse/MNGSITE-385
>             Project: Maven Project Web Site
>          Issue Type: Task
>            Reporter: Benjamin Marwell
>            Assignee: Elliotte Rusty Harold
>            Priority: Major
>
> Hello,
> the "code style page" at 
> [https://maven.apache.org/developers/conventions/code.html] should mention 
> the code style associated with the {{else}} keyword.
> Example: I created my first PR using guard statements and kept the main code 
> on the lowest possible indentation level. Only the reviwers told me that this 
> is uncommon in apache projects and not wanted. While I do not go with "it's 
> clearer to read", it is more common to read if you are used to it not to see 
> any code without indentation.
> Here's my PR with the discussion: 
> [https://github.com/apache/maven-checkstyle-plugin/pull/17.] You can clearly 
> see how I struggled and was suprised with the comments, as checkstyle did 
> went through anyway.
> That said, if this is what is wanted, this should be mentioned on the code 
> conventions page as well. Maybe even add a checkstyle rule ("no if containing 
> break/return" and "no if without else"). While I myself prefer to use guard 
> statements, it seems uncommon for apache projects.
> Please update the documentation rules accordingly.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to