You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/01/07 22:01:00 UTC

[jira] [Commented] (IMPALA-8047) Add support for the .proto file extension to .clang-format

    [ https://issues.apache.org/jira/browse/IMPALA-8047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16736414#comment-16736414 ] 

ASF subversion and git services commented on IMPALA-8047:
---------------------------------------------------------

Commit c7ff26a0435ec0bfcd228725c834da406baeb34c in impala's branch refs/heads/master from Andrew Sherman
[ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=c7ff26a ]

IMPALA-8047 Support .proto files in .clang-format

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.

Change-Id: I0c2dcfc21fc8f9206adb64166fbd05580516791f
Reviewed-on: http://gerrit.cloudera.org:8080/12165
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Add support  for the .proto file extension to .clang-format
> -----------------------------------------------------------
>
>                 Key: IMPALA-8047
>                 URL: https://issues.apache.org/jira/browse/IMPALA-8047
>             Project: IMPALA
>          Issue Type: Improvement
>            Reporter: Andrew Sherman
>            Assignee: Andrew Sherman
>            Priority: Major
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org