-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from yoheimuta/fix-indentatino-inner-elements…
…-on-the-same-line/139 Fix indentations of the inner elements on the same line/139
- Loading branch information
Showing
11 changed files
with
475 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
syntax = "proto3"; | ||
|
||
package foobar; | ||
|
||
option java_package = "com.test.foo.bar"; | ||
|
||
message TestMessage { string test_field = 1; } | ||
|
||
message TestMessageWithTwoInnerElements { string test_field = 1; string test_field2 = 2; } | ||
|
||
message TestMessageWithWrongOuterIndentation { string test_field = 1; } | ||
|
||
message TestMessageWithoutExtraSpaces {string test_field = 1;} | ||
|
||
message TestMessageWithFollowedSemicolon {string test_field = 1;}; | ||
|
||
enum enumAllowingAlias { UNKNOWN = 0; option allow_alias = true; } | ||
|
||
message TestMessageWithFollowedSemicolon { enum EnumAllowingAlias { UNKNOWN = 0; option allow_alias = true; } EnumAllowingAlias enum_field =1; }; | ||
|
||
service SearchApi { rpc search (SearchRequest) returns (SearchResponse) {};}; | ||
|
||
service SearchApi { rpc search (SearchRequest) returns (SearchResponse) {}}; | ||
|
||
service SearchApi { rpc search (SearchRequest) returns (SearchResponse);}; | ||
|
||
service camelCaseServiceName { rpc Empty(google.protobuf.Empty) returns (google.protobuf.Empty) { option (google.api.http) = { get: "/v2/example/empty", };}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
syntax = "proto3"; | ||
|
||
package foobar; | ||
|
||
option java_package = "com.test.foo.bar"; | ||
|
||
message TestMessage { string test_field = 1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
syntax = "proto3"; | ||
|
||
package foobar; | ||
|
||
option java_package = "com.test.foo.bar"; | ||
|
||
message TestMessage { string test_field = 1; } | ||
|
||
message TestMessageWithTwoInnerElements { string test_field = 1; string test_field2 = 2; } | ||
|
||
message TestMessageWithWrongOuterIndentation { string test_field = 1; } | ||
|
||
message TestMessageWithoutExtraSpaces {string test_field = 1;} | ||
|
||
message TestMessageWithFollowedSemicolon {string test_field = 1;}; | ||
|
||
enum enumAllowingAlias { UNKNOWN = 0; option allow_alias = true; } | ||
|
||
message TestMessageWithFollowedSemicolon { enum EnumAllowingAlias { UNKNOWN = 0; option allow_alias = true; } EnumAllowingAlias enum_field =1; }; | ||
|
||
service SearchApi { rpc search (SearchRequest) returns (SearchResponse) {};}; | ||
|
||
service SearchApi { rpc search (SearchRequest) returns (SearchResponse) {}}; | ||
|
||
service SearchApi { rpc search (SearchRequest) returns (SearchResponse);}; | ||
|
||
service camelCaseServiceName { rpc Empty(google.protobuf.Empty) returns (google.protobuf.Empty) { option (google.api.http) = { get: "/v2/example/empty", };}} |
57 changes: 57 additions & 0 deletions
57
_testdata/rules/indentrule/issue_139_insert_linebreaks.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
syntax = "proto3"; | ||
|
||
package foobar; | ||
|
||
option java_package = "com.test.foo.bar"; | ||
|
||
message TestMessage { | ||
string test_field = 1; | ||
} | ||
|
||
message TestMessageWithTwoInnerElements { | ||
string test_field = 1; | ||
string test_field2 = 2; | ||
} | ||
|
||
message TestMessageWithWrongOuterIndentation { | ||
string test_field = 1; | ||
} | ||
|
||
message TestMessageWithoutExtraSpaces { | ||
string test_field = 1; | ||
} | ||
|
||
message TestMessageWithFollowedSemicolon { | ||
string test_field = 1; | ||
}; | ||
|
||
enum enumAllowingAlias { | ||
UNKNOWN = 0; | ||
option allow_alias = true; | ||
} | ||
|
||
message TestMessageWithFollowedSemicolon { | ||
enum EnumAllowingAlias { | ||
UNKNOWN = 0; | ||
option allow_alias = true; | ||
} | ||
EnumAllowingAlias enum_field =1; | ||
}; | ||
|
||
service SearchApi { | ||
rpc search (SearchRequest) returns (SearchResponse) {}; | ||
}; | ||
|
||
service SearchApi { | ||
rpc search (SearchRequest) returns (SearchResponse) {} | ||
}; | ||
|
||
service SearchApi { | ||
rpc search (SearchRequest) returns (SearchResponse); | ||
}; | ||
|
||
service camelCaseServiceName { | ||
rpc Empty(google.protobuf.Empty) returns (google.protobuf.Empty) { | ||
option (google.api.http) = { get: "/v2/example/empty", }; | ||
} | ||
} |
Oops, something went wrong.