HBase
  1. HBase
  2. HBASE-10824

Enhance detection of protobuf generated code in line length check

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.99.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In review of HBASE-5175, Anoop found that long line detection wasn't very effective for protobuf generated code.
      Here is one example:

      -1 lineLengths. The patch introduces the following lines longer than 100:
      + private DoubleMsg(boolean noInit)
      { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
      

      This is current filter:

        lines=`cat $PATCH_DIR/patch | grep "^+" | grep -v "^@@" | grep -v "^+++" | grep -v "import" | grep -v "hbase.protobuf.generated" | awk -v len="$MAX_LINE_LENGTH_PATCH"    'length ($0) > len' | head -n 10`
      

      'com.google.protobuf.' should be considered as well.

        Activity

        Ted Yu created issue -
        Ted Yu made changes -
        Field Original Value New Value
        Assignee Ted Yu [ yuzhihong@gmail.com ]
        Ted Yu made changes -
        Summary Enhance detection of protobuf generated code in line length detection Enhance detection of protobuf generated code in line length check
        Ted Yu made changes -
        Attachment 10824-v1.txt [ 12636513 ]
        Ted Yu made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Ted Yu made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 0.99.0 [ 12325675 ]
        Resolution Fixed [ 1 ]
        Enis Soztutar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Ted Yu
            Reporter:
            Ted Yu
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development