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

Carl Steinbach commented on HIVE-1123:
--------------------------------------

* The Sun coding standard does not specify how to indent "throws" clauses, and 
the sun_checks.xml configuration that Checkstyle defaults to does not invoke 
the Indentation module.
* I copied the indentation settings from the Hadoop Checkstyle configuration:
{code}
    <module name="Indentation">
      <property name="basicOffset" value="2" />
      <property name="caseIndent" value="0" /> 
</module> 
{code}
* The configuration options for the Checkstyle Indentation module are described 
here: http://checkstyle.sourceforge.net/config_misc.html#Indentation
* Note that Checkstyle only gives you one setting, i.e. "basicOffset", so there 
is no way of saying "indent by 2, unless it's a throws clause, in which case 
indent by 4 spaces".

I personally prefer indenting throws clauses by 4 spaces in order to make them 
stand out,
but unfortunately Checkstyle does not make it possible to enforce this and 2 
space basic
indentation at the same time. However, I'm willing to compromise since I think 
the tool is
beneficial over all, and it's important to get the total number of violations 
down to a low number
so that people will pay attention to it.




> 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.cli.patch, HIVE-1123.common.patch, 
> HIVE-1123.contrib.patch, HIVE-1123.hwi.patch, HIVE-1123.jdbc.patch, 
> HIVE-1123.metastore.patch, HIVE-1123.ql.patch, HIVE-1123.serde.patch, 
> HIVE-1123.service.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.

Reply via email to