Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace "label" check with "cardinality" check #2927

Merged
merged 8 commits into from
May 2, 2024
6 changes: 4 additions & 2 deletions private/buf/cmd/buf/buf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ ENUM_SAME_TYPE FILE, PACKAGE
ENUM_VALUE_NO_DELETE FILE, PACKAGE Checks that enum values are not deleted from a given enum.
EXTENSION_MESSAGE_NO_DELETE FILE, PACKAGE Checks that extension ranges are not deleted from a given message.
FIELD_NO_DELETE FILE, PACKAGE Checks that fields are not deleted from a given message.
FIELD_SAME_CARDINALITY FILE, PACKAGE Checks that fields have the same cardinalities in a given message.
FIELD_SAME_CTYPE FILE, PACKAGE Checks that fields have the same value for the ctype option.
FIELD_SAME_JSTYPE FILE, PACKAGE Checks that fields have the same value for the jstype option.
FIELD_SAME_TYPE FILE, PACKAGE Checks that fields have the same types in a given message.
Expand Down Expand Up @@ -668,7 +669,6 @@ RPC_NO_DELETE FILE, PACKAGE
ENUM_VALUE_SAME_NAME FILE, PACKAGE, WIRE_JSON Checks that enum values have the same name.
FIELD_SAME_JSON_NAME FILE, PACKAGE, WIRE_JSON Checks that fields have the same value for the json_name option.
FIELD_SAME_NAME FILE, PACKAGE, WIRE_JSON Checks that fields have the same names in a given message.
FIELD_SAME_LABEL FILE, PACKAGE, WIRE_JSON, WIRE Checks that fields have the same labels in a given message.
FIELD_SAME_ONEOF FILE, PACKAGE, WIRE_JSON, WIRE Checks that fields have the same oneofs in a given message.
FILE_SAME_PACKAGE FILE, PACKAGE, WIRE_JSON, WIRE Checks that files have the same package.
MESSAGE_SAME_MESSAGE_SET_WIRE_FORMAT FILE, PACKAGE, WIRE_JSON, WIRE Checks that messages have the same value for the message_set_wire_format option.
Expand All @@ -686,9 +686,11 @@ PACKAGE_NO_DELETE PACKAGE
PACKAGE_SERVICE_NO_DELETE PACKAGE Checks that services are not deleted from a given package.
ENUM_VALUE_NO_DELETE_UNLESS_NAME_RESERVED WIRE_JSON Checks that enum values are not deleted from a given enum unless the name is reserved.
FIELD_NO_DELETE_UNLESS_NAME_RESERVED WIRE_JSON Checks that fields are not deleted from a given message unless the name is reserved.
FIELD_WIRE_JSON_COMPATIBLE_CARDINALITY WIRE_JSON Checks that fields have wire and JSON compatible cardinalities in a given message.
FIELD_WIRE_JSON_COMPATIBLE_TYPE WIRE_JSON Checks that fields have wire and JSON compatible types in a given message.
ENUM_VALUE_NO_DELETE_UNLESS_NUMBER_RESERVED WIRE_JSON, WIRE Checks that enum values are not deleted from a given enum unless the number is reserved.
FIELD_NO_DELETE_UNLESS_NUMBER_RESERVED WIRE_JSON, WIRE Checks that fields are not deleted from a given message unless the number is reserved.
FIELD_WIRE_COMPATIBLE_CARDINALITY WIRE Checks that fields have wire-compatible cardinalities in a given message.
FIELD_WIRE_COMPATIBLE_TYPE WIRE Checks that fields have wire-compatible types in a given message.
`
testRunStdout(
Expand Down Expand Up @@ -782,7 +784,7 @@ RPC_NO_DELETE FILE, PACKAGE
ENUM_VALUE_SAME_NAME FILE, PACKAGE, WIRE_JSON Checks that enum values have the same name.
FIELD_SAME_JSON_NAME FILE, PACKAGE, WIRE_JSON Checks that fields have the same value for the json_name option.
FIELD_SAME_NAME FILE, PACKAGE, WIRE_JSON Checks that fields have the same names in a given message.
FIELD_SAME_LABEL FILE, PACKAGE, WIRE_JSON, WIRE Checks that fields have the same labels in a given message.
FIELD_SAME_CARDINALITY FILE, PACKAGE, WIRE_JSON, WIRE Checks that fields have the same cardinalities in a given message.
FIELD_SAME_ONEOF FILE, PACKAGE, WIRE_JSON, WIRE Checks that fields have the same oneofs in a given message.
FIELD_SAME_TYPE FILE, PACKAGE, WIRE_JSON, WIRE Checks that fields have the same types in a given message.
MESSAGE_SAME_MESSAGE_SET_WIRE_FORMAT FILE, PACKAGE, WIRE_JSON, WIRE Checks that messages have the same value for the message_set_wire_format option.
Expand Down