You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Brian Cho (JIRA)" <ji...@apache.org> on 2015/06/17 03:37:00 UTC

[jira] [Closed] (REEF-360) Fix violations / reconfigure checkstyle checks in "Blocks" category

     [ https://issues.apache.org/jira/browse/REEF-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Cho closed REEF-360.
--------------------------
    Resolution: Fixed

Merged https://github.com/apache/incubator-reef/pull/223

> Fix violations / reconfigure checkstyle checks in "Blocks" category
> -------------------------------------------------------------------
>
>                 Key: REEF-360
>                 URL: https://issues.apache.org/jira/browse/REEF-360
>             Project: REEF
>          Issue Type: Sub-task
>          Components: All
>            Reporter: Mariia Mykhailova
>            Assignee: Mariia Mykhailova
>            Priority: Minor
>             Fix For: 0.12
>
>
> # *LeftCurly* ({ must be on the end of line) and *NeedBraces* ({} around code blocks): fix
> # *AvoidNestedBlocks* (prohibit "blocks used freely in code"): we have several violations, but some of them seem legit because they introduce local variables:
>   #* org/apache/reef/util/MemoryUtils.java, line 101
>   #* org/apache/reef/examples/suspend/SuspendDriver.java, line 280
>   #* org/apache/reef/webserver/HttpServerReefEventHandler.java, line 122
> The check can be configured to ignore blocks in case in a switch statement, but not the first one.
> # *EmptyBlock (prohibit blocks without any statements): we have multiple violations, majority of them due to empty catch clauses. The check can be reconfigured to allow blocks with comments only, or to enforce the check for only an explicit subset of block types (excluding catch blocks); it feels weird to add some kind of empty statement just for the sake of it being present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)