-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Create a new, configurable linter named dependenttags to enforce dependencies between markers. This prevents API inconsistencies where one marker requires the presence of
another.
Problem
There is currently no way to enforce that certain markers must be used together. For example, a field marked with +k8s:unionMember must also be marked +k8s:optional.
Solution
The linter will be configured with a main tag and a list of required dependent tags. If the main tag is present on a field, the linter will ensure at all the dependent tags are present.
Example
This would be invalid:
// +k8s:unionMember
MyField stringThis would be valid:
// +k8s:unionMember
// +k8s:optional
MyField stringMetadata
Metadata
Assignees
Labels
No labels