-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Description
Create a new, configurable linter named conflictingmarkers
to detect and report when mutually exclusive markers are used on the same field. This prevents common configuration errors and unexpected behavior.
Problem
There is currently no generalized way to prevent the use of conflicting markers. For example, a field cannot have both a default
value and be required
. This linter will provide a flexible solution to this and similar issues.
Requirements
-
Generic Conflict Detection: The linter should identify fields that have markers from two conflicting sets.
-
Built-in Rules: It must include checks for the following initial conflicts:
optional
vs.required
:- Set A:
optional
,+kubebuilder:validation:Optional
- Set B:
required
,+kubebuilder:validation:Required
- Set A:
default
vs.required
:- Set A:
default
,+kubebuilder:default
- Set B:
required
,+kubebuilder:validation:Required
- Set A:
-
Configurability: Allow users to define their own custom sets of conflicting markers in the linter's configuration.