Skip to content

Commit

Permalink
Lint fix (#270)
Browse files Browse the repository at this point in the history
* Update proto formatting to match best practices.
  • Loading branch information
TristonianJones authored Oct 9, 2019
1 parent 7963958 commit 6c3c34f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
3 changes: 3 additions & 0 deletions common/types/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ func TestConcatList_ConvertToNative_Json(t *testing.T) {
listC := NewDynamicList(reg, []*dpb.Duration{{Seconds: 100}})
listConcat := listA.Add(listC)
json, err = listConcat.ConvertToNative(jsonValueType)
if err != nil {
t.Error(err)
}
jsonTxt, err = (&jsonpb.Marshaler{}).MarshalToString(json.(proto.Message))
if err != nil {
t.Error(err)
Expand Down
24 changes: 12 additions & 12 deletions test/proto2pb/test_all_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

syntax = "proto2";

package google.expr.proto2.test;

import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";

package google.expr.proto2.test;

// This proto includes every type of field in both singular and repeated
// forms.
message TestAllTypes {
Expand All @@ -27,21 +27,21 @@ message TestAllTypes {
}

// Singular
optional int32 single_int32 = 1 [ default = -32 ];
optional int64 single_int64 = 2 [ default = -64 ];
optional uint32 single_uint32 = 3 [ default = 32 ];
optional uint64 single_uint64 = 4 [ default = 64 ];
optional int32 single_int32 = 1 [default = -32];
optional int64 single_int64 = 2 [default = -64];
optional uint32 single_uint32 = 3 [default = 32];
optional uint64 single_uint64 = 4 [default = 64];
optional sint32 single_sint32 = 5;
optional sint64 single_sint64 = 6;
optional fixed32 single_fixed32 = 7;
optional fixed64 single_fixed64 = 8;
optional sfixed32 single_sfixed32 = 9;
optional sfixed64 single_sfixed64 = 10;
optional float single_float = 11 [ default = 3.0 ];
optional double single_double = 12 [ default = 6.4 ];
optional bool single_bool = 13 [ default = true ];
optional string single_string = 14 [ default = "empty" ];
optional bytes single_bytes = 15 [ default = "none" ];
optional float single_float = 11 [default = 3.0];
optional double single_double = 12 [default = 6.4];
optional bool single_bool = 13 [default = true];
optional string single_string = 14 [default = "empty"];
optional bytes single_bytes = 15 [default = "none"];

// Wellknown.
optional google.protobuf.Any single_any = 100;
Expand All @@ -62,7 +62,7 @@ message TestAllTypes {
// Nested messages
oneof nested_type {
NestedMessage single_nested_message = 18;
NestedEnum single_nested_enum = 21 [ default = BAR ];
NestedEnum single_nested_enum = 21 [default = BAR];
}

// Repeated
Expand Down
6 changes: 3 additions & 3 deletions test/proto3pb/test_all_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

syntax = "proto3";

package google.expr.proto3.test;

import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";

package google.expr.proto3.test;

// This proto includes every type of field in both singular and repeated
// forms.
message TestAllTypes {
Expand Down Expand Up @@ -58,7 +58,7 @@ message TestAllTypes {
google.protobuf.StringValue single_string_wrapper = 111;
google.protobuf.BoolValue single_bool_wrapper = 112;
google.protobuf.BytesValue single_bytes_wrapper = 113;

// Nested messages
oneof nested_type {
NestedMessage single_nested_message = 18;
Expand Down

0 comments on commit 6c3c34f

Please sign in to comment.