-
Notifications
You must be signed in to change notification settings - Fork 53
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 #210 from yoheimuta/field-fixer
Add field fixers
- Loading branch information
Showing
10 changed files
with
220 additions
and
15 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
15 changes: 15 additions & 0 deletions
15
_testdata/rules/proto3FieldsAvoidRequired/avoid_required.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,15 @@ | ||
syntax = "proto3"; | ||
|
||
message first_outer { | ||
// inner is an inner message. | ||
message first_inner { // Level 2 | ||
repeated inner innerMessage = 2; | ||
inner innerRequired = 5; | ||
} | ||
} | ||
|
||
message second_outer { | ||
int64 hoge = 4; | ||
string fuga = 3; | ||
} | ||
|
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,15 @@ | ||
syntax = "proto3"; | ||
|
||
message first_outer { | ||
// inner is an inner message. | ||
message first_inner { // Level 2 | ||
repeated inner innerMessage = 2; | ||
required inner innerRequired = 5; | ||
} | ||
} | ||
|
||
message second_outer { | ||
required int64 hoge = 4; | ||
string fuga = 3; | ||
} | ||
|
18 changes: 18 additions & 0 deletions
18
_testdata/rules/repeatedFieldNamesPluralized/invalid.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,18 @@ | ||
syntax = "proto3"; | ||
|
||
message first_outer { | ||
// inner is an inner message. | ||
message first_inner { // Level 2 | ||
repeated inner innerMessage = 2; | ||
} | ||
repeated string My_map = 4; | ||
group Result = 8 { | ||
repeated string url = 9; | ||
int64 amount = 10; | ||
} | ||
} | ||
|
||
message second_outer { | ||
repeated google.protobuf.Empty OneofEmpty = 20; | ||
string oneof_String = 21; | ||
} |
18 changes: 18 additions & 0 deletions
18
_testdata/rules/repeatedFieldNamesPluralized/pluralized.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,18 @@ | ||
syntax = "proto3"; | ||
|
||
message first_outer { | ||
// inner is an inner message. | ||
message first_inner { // Level 2 | ||
repeated inner innerMessages = 2; | ||
} | ||
repeated string My_maps = 4; | ||
group Result = 8 { | ||
repeated string urls = 9; | ||
int64 amount = 10; | ||
} | ||
} | ||
|
||
message second_outer { | ||
repeated google.protobuf.Empty OneofEmpties = 20; | ||
string oneof_String = 21; | ||
} |
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
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