buf
buf copied to clipboard
Add a check for `required` to `PROTOVALIDATE` lint rule for repeated and map key/values
Feature
If someone sets required on repeated field rules or map key/value field rules, e.g.
message Foo {
map<string, int> map_example = 1 [(buf.validate.field).map.keys.required = true];
repeated string repeated_example = 2 [(buf.validate.field).repeated.required = true];
}
These are unenforceable constraints/no-ops for protovalidate. As a part of the lint rule, we should surface these to the user.