| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
name: "pb" |
| 16 |
|
| 17 |
imports: |
| 18 |
- name: google.expr.proto3.test.TestAllTypes |
| 19 |
- name: google.expr.proto3.test.TestAllTypes.NestedEnum |
| 20 |
- name: | |
| 21 |
google.expr.proto3.test.ImportedGlobalEnum |
| 22 |
|
| 23 |
rule: |
| 24 |
match: |
| 25 |
- condition: > |
| 26 |
spec.single_int32 > TestAllTypes{single_int64: 10}.single_int64 |
| 27 |
output: | |
| 28 |
"invalid spec, got single_int32=%d, wanted <= 10".format([spec.single_int32]) |
| 29 |
- condition: > |
| 30 |
spec.standalone_enum == NestedEnum.BAR || |
| 31 |
ImportedGlobalEnum.IMPORT_BAR in spec.imported_enums |
| 32 |
output: | |
| 33 |
"invalid spec, neither nested nor imported enums may refer to BAR or IMPORT_BAR" |