Sqoop
  1. Sqoop
  2. SQOOP-432

Enforce writing space after if statement

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 1.4.0-incubating
    • Fix Version/s: 1.4.1-incubating
    • Component/s: None
    • Labels:
      None

      Description

      We're currently not enforcing (=~ "ant checkstyle" is not enforcing) writing space after if statement even though we're using such code policy in the code. Would be nice if the policy would be enforced to be consistent across entire code base.

      1. SQOOP-432.patch
        13 kB
        Joseph Boyd

        Activity

        Jarek Jarcec Cecho created issue -
        Hide
        Joseph Boyd added a comment -

        Almost have a patch ready for this.

        Show
        Joseph Boyd added a comment - Almost have a patch ready for this.
        Hide
        Joseph Boyd added a comment -

        Attached patch adds WhitespaceAround module [1] config to checkstyle, configured only to enforce space around if literals.

        Patch also updates 30 or so checkstyle failures from this new rule.

        [1] http://checkstyle.sourceforge.net/config_whitespace.html

        Show
        Joseph Boyd added a comment - Attached patch adds WhitespaceAround module [1] config to checkstyle, configured only to enforce space around if literals. Patch also updates 30 or so checkstyle failures from this new rule. [1] http://checkstyle.sourceforge.net/config_whitespace.html
        Joseph Boyd made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Assignee Joseph Boyd [ jboyd963 ]
        Hide
        Joseph Boyd added a comment -

        patch adding checkstyle rule.

        Show
        Joseph Boyd added a comment - patch adding checkstyle rule.
        Joseph Boyd made changes -
        Attachment SQOOP-432.patch [ 12512032 ]
        Hide
        Bilung Lee added a comment -

        Thanks for the patch, Joseph! Could you please submit your patch through review board (http://reviews.apache.org) for review? Thanks!

        Show
        Bilung Lee added a comment - Thanks for the patch, Joseph! Could you please submit your patch through review board ( http://reviews.apache.org ) for review? Thanks!
        Hide
        Jarek Jarcec Cecho added a comment -

        Hi Joseph,
        thank you very much for taking care of this issue. Would you mind to upload your patch to review board for review?

        Jarcec

        Show
        Jarek Jarcec Cecho added a comment - Hi Joseph, thank you very much for taking care of this issue. Would you mind to upload your patch to review board for review? Jarcec
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3645/
        -----------------------------------------------------------

        Review request for Bilung Lee and Jarek Cecho.

        Summary
        -------

        Patch for SQOOP-432

        https://issues.apache.org/jira/browse/SQOOP-432

        This addresses bug SQOOP-432.
        https://issues.apache.org/jira/browse/SQOOP-432

        Diffs


        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/cli/SqoopParser.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/hive/TableDefWriter.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBConfiguration.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBInputFormat.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBRecordReader.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/OracleDBRecordReader.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/AvroSchemaGenerator.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/ClassWriter.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/tool/ImportTool.java 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/test/checkstyle.xml 1236344
        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/test/com/cloudera/sqoop/TestAvroImport.java 1236344

        Diff: https://reviews.apache.org/r/3645/diff

        Testing
        -------

        'ant checkstyle' returns no errors after the changes in the patch.

        Thanks,

        Joseph

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3645/ ----------------------------------------------------------- Review request for Bilung Lee and Jarek Cecho. Summary ------- Patch for SQOOP-432 https://issues.apache.org/jira/browse/SQOOP-432 This addresses bug SQOOP-432 . https://issues.apache.org/jira/browse/SQOOP-432 Diffs http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/cli/SqoopParser.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/hive/TableDefWriter.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBConfiguration.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBInputFormat.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBRecordReader.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/OracleDBRecordReader.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/AvroSchemaGenerator.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/ClassWriter.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/tool/ImportTool.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/test/checkstyle.xml 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/test/com/cloudera/sqoop/TestAvroImport.java 1236344 Diff: https://reviews.apache.org/r/3645/diff Testing ------- 'ant checkstyle' returns no errors after the changes in the patch. Thanks, Joseph
        Hide
        Joseph Boyd added a comment -
        Show
        Joseph Boyd added a comment - Up for review at https://reviews.apache.org/r/3645/
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3645/#review4642
        -----------------------------------------------------------

        Ship it!

        • Bilung

        On 2012-01-26 22:01:20, Joseph Boyd wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3645/

        -----------------------------------------------------------

        (Updated 2012-01-26 22:01:20)

        Review request for Bilung Lee and Jarek Cecho.

        Summary

        -------

        Patch for SQOOP-432

        https://issues.apache.org/jira/browse/SQOOP-432

        This addresses bug SQOOP-432.

        https://issues.apache.org/jira/browse/SQOOP-432

        Diffs

        -----

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/cli/SqoopParser.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/hive/TableDefWriter.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBConfiguration.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBInputFormat.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBRecordReader.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/OracleDBRecordReader.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/AvroSchemaGenerator.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/ClassWriter.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/tool/ImportTool.java 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/test/checkstyle.xml 1236344

        http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/test/com/cloudera/sqoop/TestAvroImport.java 1236344

        Diff: https://reviews.apache.org/r/3645/diff

        Testing

        -------

        'ant checkstyle' returns no errors after the changes in the patch.

        Thanks,

        Joseph

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3645/#review4642 ----------------------------------------------------------- Ship it! Bilung On 2012-01-26 22:01:20, Joseph Boyd wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3645/ ----------------------------------------------------------- (Updated 2012-01-26 22:01:20) Review request for Bilung Lee and Jarek Cecho. Summary ------- Patch for SQOOP-432 https://issues.apache.org/jira/browse/SQOOP-432 This addresses bug SQOOP-432 . https://issues.apache.org/jira/browse/SQOOP-432 Diffs ----- http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/cli/SqoopParser.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/hive/TableDefWriter.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBConfiguration.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBInputFormat.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBRecordReader.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/OracleDBRecordReader.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/AvroSchemaGenerator.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/ClassWriter.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/tool/ImportTool.java 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/test/checkstyle.xml 1236344 http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/test/com/cloudera/sqoop/TestAvroImport.java 1236344 Diff: https://reviews.apache.org/r/3645/diff Testing ------- 'ant checkstyle' returns no errors after the changes in the patch. Thanks, Joseph
        Hide
        Bilung Lee added a comment -

        Thanks, Joseph! Patch committed.

        Show
        Bilung Lee added a comment - Thanks, Joseph! Patch committed.
        Bilung Lee made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6 #80 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6/80/)
        SQOOP-432. Enforce writing space after if statement

        blee : http://svn.apache.org/viewvc/?view=rev&rev=1236496
        Files :

        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/cli/SqoopParser.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/hive/TableDefWriter.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBConfiguration.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBInputFormat.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBRecordReader.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/OracleDBRecordReader.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/AvroSchemaGenerator.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/ClassWriter.java
        • /incubator/sqoop/trunk/src/java/org/apache/sqoop/tool/ImportTool.java
        • /incubator/sqoop/trunk/src/test/checkstyle.xml
        • /incubator/sqoop/trunk/src/test/com/cloudera/sqoop/TestAvroImport.java
        Show
        Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6 #80 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6/80/ ) SQOOP-432 . Enforce writing space after if statement blee : http://svn.apache.org/viewvc/?view=rev&rev=1236496 Files : /incubator/sqoop/trunk/src/java/org/apache/sqoop/cli/SqoopParser.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/hive/TableDefWriter.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBConfiguration.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBInputFormat.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBRecordReader.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/OracleDBRecordReader.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/AvroSchemaGenerator.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/orm/ClassWriter.java /incubator/sqoop/trunk/src/java/org/apache/sqoop/tool/ImportTool.java /incubator/sqoop/trunk/src/test/checkstyle.xml /incubator/sqoop/trunk/src/test/com/cloudera/sqoop/TestAvroImport.java
        Jarek Jarcec Cecho made changes -
        Fix Version/s 1.4.1-incubating [ 12318902 ]

          People

          • Assignee:
            Joseph Boyd
            Reporter:
            Jarek Jarcec Cecho
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development