You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tajo.apache.org by "Sergio Esteves (JIRA)" <ji...@apache.org> on 2013/09/06 05:47:51 UTC

[jira] [Created] (TAJO-164) Maven plugin for code style

Sergio Esteves created TAJO-164:
-----------------------------------

             Summary: Maven plugin for code style
                 Key: TAJO-164
                 URL: https://issues.apache.org/jira/browse/TAJO-164
             Project: Tajo
          Issue Type: Improvement
            Reporter: Sergio Esteves


While merging some code, I've been noticing that different developers (including me) have been using different styles.

Examples:
a)
{quote}
switch(...) {
  case ...
{quote}
instead of
{quote}
switch(...) {
case ...
{quote}

b) "private long estimateSizeRecursive(TaskAttemptContext ctx, String [] tableIds) {" <- space between "String" and "[]".

c) Mixing tabs with spaces.

d) 
{quote}
import org.apache.hadoop.yarn.state.*;
{quote}
instead of
{quote}
import org.apache.hadoop.yarn.state.InvalidStateTransitonException;
import org.apache.hadoop.yarn.state.MultipleArcTransition;
import org.apache.hadoop.yarn.state.SingleArcTransition;
import org.apache.hadoop.yarn.state.StateMachine;
import org.apache.hadoop.yarn.state.StateMachineFactory;
{quote}

I think it might be useful, to ensure everyone is adopting the same style, to include a maven plugin to check if the code style is in accordance with tajo rules (e.g., http://maven.apache.org/plugins/maven-checkstyle-plugin/ ).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira