-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Description
Currently, the linter enforces that at least one field in a struct must have a required marker (e.g., +required). However, it should also accept cases where the entire struct includes a validation marker that has an equivalent meaning, e.g.:
+kubebuilder:validation:AtLeastOneOf
+kubebuilder:validation:ExactlyOneOf
In such cases, the struct-level validation marker already enforces that at least one field is required, so the linter should not raise an error.
It might make sense to add a configuration option to this linter that allows specifying field- and type-level markers which should be interpreted as fulfilling the required constraint.
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.