Skip to content

Add a check for required to PROTOVALIDATE lint rule for repeated and map key/values #3812

Open
@doriable

Description

@doriable

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 constraint/no-ops for protovalidate. As a part of the lint rule, we should surface these to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions