Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-10824

Enhance detection of protobuf generated code in line length check

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.99.0
    • None
    • None
    • 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.

      Attachments

        1. 10824-v1.txt
          0.8 kB
          Ted Yu

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: