Skip to content

Commit 490982f

Browse files
committed
api: explicitly set default marker to +kubebuilder:default
kube-api-linter prefers using the `+default` marker and will warn about our use of `+kubebuilder:default`. We could switch the API to use `+default`, however `elastic/crd-ref-docs` doesn't yet understand this marker. A patch merged to add support but it's not yet in a release. Let's stick to `+kubebuilder:default` for now.
1 parent d801092 commit 490982f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.golangci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ linters:
3535
linters:
3636
disable:
3737
- arrayofstruct
38-
- defaults
3938
- nonpointerstructs
4039
- optionalfields
4140
enable:
4241
- commentstart
4342
- conditions
43+
- defaults
4444
- duplicatemarkers
4545
- integers
4646
- jsontags
@@ -65,6 +65,9 @@ linters:
6565
isFirstField: Warn
6666
usePatchStrategy: Ignore
6767
useProtobuf: Forbid
68+
defaults:
69+
# Let's use `+kubebuilder:default` until elastic/crd-ref-docs supports `+default`
70+
preferredDefaultMarker: "kubebuilder:default"
6871
requiredfields:
6972
omitempty:
7073
policy: Ignore

0 commit comments

Comments
 (0)