hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-1051) Add checkstyle target to ant build file
Date Thu, 01 Mar 2007 20:37:50 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477079

Doug Cutting commented on HADOOP-1051:


It might be useful to add this.  A patch should ideally not increase the number of style warnings.
 But, first, we'll need to agree on the default settings, which will be contentious.  For
example, I find the following warnings spurious:

'cast' is not followed by whitespace.
'+' should be on a new line.
'||' should be on a new line.
'1024' is a magic number.
'0xffff' is a magic number.
Using the '.*' form of import should be avoided - org.apache.commons.logging.*.

I'm even okay with if's that don't have braces when there's no 'else' clause.  Indentation
tells the story there quite well and it's not a source of errors or misunderstandings.  But
I suspect there are those who will argue with that.

On the other hand, I'm bothered by lines over 80 columns and non-2-space indentation (the
testing of which you've disabled) while many others are apparently not.  However I've managed
to collaborate on projects with such people for many years, without any serious problems.

Reasonable people differ about these things.  I fear we could waste a lot of time bickering
about the standard style definition at the expense of getting things done.  Selective enforcement
by committers, with all its pitfalls, may be a more pragmatic route.

> Add checkstyle target to ant build file
> ---------------------------------------
>                 Key: HADOOP-1051
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1051
>             Project: Hadoop
>          Issue Type: Test
>          Components: build, test
>    Affects Versions: 0.11.2
>            Reporter: Tom White
>         Assigned To: Tom White
>         Attachments: checkstyle-errors.html, checkstyle.patch
> As discussed in HADOOP-948, add a target to allow people to run style checks on the codebase.

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

View raw message