Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-8047

Add support for the .proto file extension to .clang-format

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Impala 3.2.0
    • Component/s: None
    • Labels:
      None
    • Epic Color:
      ghx-label-9

      Description

      The .proto file extension is used for the Google Protocol Buffers language. Impala uses this language to specify the format of messages used by KRPC. Add support for this language to .clang-format so that we can have consistent formatting.

      The proposed support is:

      {{Language: Proto
      BasedOnStyle: Google
      ColumnLimit: 90}}

      This produces only a few diffs when run against the existing Impala code. I’m not proposing to make any changes to .proto files, this is just to show what clang-format will do. Apart from wrapping comments and code at 90 chars, the diffs are mostly of the form

      {{-syntax="proto2";
      +syntax = "proto2";}}

      {{-  message Certificate {};
      +  message Certificate

      { +  }

      ;}}

      {{-  optional bool client_timeout_defined = 4 [ default = false ];
      +  optional bool client_timeout_defined = 4 [default = false];}}

      {{-    UNKNOWN        = 999;

      •    NEGOTIATE      = 1;
      •    SASL_SUCCESS   = 0;
      •    SASL_INITIATE  = 2;
        +    UNKNOWN = 999;
        +    NEGOTIATE = 1;
        +    SASL_SUCCESS = 0;
        +    SASL_INITIATE = 2;}}

      This last change can be configured using “AlignConsecutiveAssignments: true” but that creates a different set of diffs.

        Attachments

          Activity

            People

            • Assignee:
              asherman Andrew Sherman
              Reporter:
              asherman Andrew Sherman

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment