You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Rogers (Jira)" <ji...@apache.org> on 2019/11/17 02:08:00 UTC

[jira] [Comment Edited] (DRILL-7352) Introduce new checkstyle rules to make code style more consistent

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

Paul Rogers edited comment on DRILL-7352 at 11/17/19 2:07 AM:
--------------------------------------------------------------

Start with the [existing set of rules|http://drill.apache.org/docs/apache-drill-contribution-guidelines/].

* Import order. Typical order: `java`, javax`, `org`, `com`. Static imports at the top.
* Use `final` aggressively on fields, do not use it on local variables or parameters.
* `case` statements indent one level in from the `switch` statements.

Once decisions are finalized, update the format files for Eclipse and IntelliJ.


was (Author: paul.rogers):
Start with the [existing set of rules|http://drill.apache.org/docs/apache-drill-contribution-guidelines/].

* Import order. Typical order: `java`, javax`, `org`, `com`. Static imports at the top.
* Use `final` aggressively on fields, do not use it on local variables or parameters.

Once decisions are finalized, update the format files for Eclipse and IntelliJ.

> Introduce new checkstyle rules to make code style more consistent
> -----------------------------------------------------------------
>
>                 Key: DRILL-7352
>                 URL: https://issues.apache.org/jira/browse/DRILL-7352
>             Project: Apache Drill
>          Issue Type: Task
>            Reporter: Vova Vysotskyi
>            Priority: Major
>
> Source - https://checkstyle.sourceforge.io/checks.html
> List of rules to be enabled:
> * [LeftCurly|https://checkstyle.sourceforge.io/config_blocks.html#LeftCurly] - force placement of a left curly brace at the end of the line.
> * [RightCurly|https://checkstyle.sourceforge.io/config_blocks.html#RightCurly] - force placement of a right curly brace
> * [NewlineAtEndOfFile|https://checkstyle.sourceforge.io/config_misc.html#NewlineAtEndOfFile]
> * [UnnecessaryParentheses|https://checkstyle.sourceforge.io/config_coding.html#UnnecessaryParentheses]
> * [MethodParamPad|https://checkstyle.sourceforge.io/config_whitespace.html#MethodParamPad]
> * [InnerTypeLast |https://checkstyle.sourceforge.io/config_design.html#InnerTypeLast]
> * [MissingOverride|https://checkstyle.sourceforge.io/config_annotation.html#MissingOverride]
> * [InvalidJavadocPosition|https://checkstyle.sourceforge.io/config_javadoc.html#InvalidJavadocPosition]
> * [ArrayTypeStyle|https://checkstyle.sourceforge.io/config_misc.html#ArrayTypeStyle]
> * [UpperEll|https://checkstyle.sourceforge.io/config_misc.html#UpperEll]
> and others



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