hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-1123) Checkstyle fixes
Date Thu, 04 Feb 2010 02:08:28 GMT

    [ https://issues.apache.org/jira/browse/HIVE-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829390#action_12829390
] 

Zheng Shao commented on HIVE-1123:
----------------------------------

For these changes, shall we do it by the *type* of the change instead of the packages?
The reason is that some of the changes we might want to discuss more with more people involved,
but the others are good to go.

Here is the short list of what I see from the patch. I think most people will agree to these
items.
{code}
Line length:
  Limit is 100

Spacing:
  Spaces between operator and operands except i++
  Spaces between if and (, for and (, while and (
  No spaces between ( and the first operand, or the last operand and )
  Same for {}
  
Curly braces:
  Required even for single-line if
  } else {

Javadoc Comments:
  Required for all public members (classes, methods) but not getter/setter.
  The first line of each javadoc is the short description. Should end with "."
  Each line of javadoc should start with capital letters.

Keyword order:
  public static final
  Declare the class as final if not intended to be inherited.

Code:
   Default private constructor for Utility classes.
  "Type[] var" instead of "Type var[]"

Capitalization:
  Constant should be all capitalized
  Classes should be first-letter capitalized
  Variable names should be first-letter lowercased, with the first letter of each additional
word capitalized.
  Don't use _ in variable names.

Imports:
  Ordered alphabetically
{code}


It seems you also removed the spaces for empty lines, but somehow my eclipse automatically
generates those spaces for empty lines.

By the way, did you do it by hand or you auto-generated the changes? If it's automatic, shall
we do it one rule by one rule instead of one package by one package?



> Checkstyle fixes
> ----------------
>
>                 Key: HIVE-1123
>                 URL: https://issues.apache.org/jira/browse/HIVE-1123
>             Project: Hadoop Hive
>          Issue Type: Task
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: HIVE-1123.checkstyle.patch, HIVE-1123.cli.2.patch, HIVE-1123.cli.patch,
HIVE-1123.common.2.patch, HIVE-1123.common.patch, HIVE-1123.contrib.2.patch, HIVE-1123.contrib.patch,
HIVE-1123.hwi.2.patch, HIVE-1123.hwi.patch, HIVE-1123.jdbc.2.patch, HIVE-1123.jdbc.patch,
HIVE-1123.metastore.2.patch, HIVE-1123.metastore.patch, HIVE-1123.ql.2.patch, HIVE-1123.ql.patch,
HIVE-1123.serde.2.patch, HIVE-1123.serde.patch, HIVE-1123.service.2.patch, HIVE-1123.service.patch,
HIVE-1123.shims.2.patch, HIVE-1123.shims.patch
>
>
> Fix checkstyle errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message