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

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development