You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .golangci-kal.yml
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ linters-settings:
19
19
- "conditions"# Ensure conditions have the correct json tags and markers.
20
20
- "integers"# Ensure only int32 and int64 are used for integers.
21
21
- "statussubresource"# All root objects that have a `status` field should have a status subresource.
22
+
- "optionalorrequired"# Every field should be marked as `+optional` or `+required`.
22
23
23
24
# Per discussion in July 2024, we are keeping phase fields for now.
24
25
# See https://github.com/kubernetes-sigs/cluster-api/pull/10897#discussion_r1685929508
@@ -30,7 +31,6 @@ linters-settings:
30
31
# - "jsontags" # Ensure every field has a json tag.
31
32
# - "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items.
32
33
# - "nobools" # Bools do not evolve over time, should use enums instead.
33
-
# - "optionalorrequired" # Every field should be marked as `+optional` or `+required`.
34
34
# - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`.
35
35
disable:
36
36
- "*"# We will manually enable new linters after understanding the impact. Disable all by default.
@@ -41,9 +41,6 @@ linters-settings:
41
41
useProtobuf: Forbid # We don't use protobuf, so protobuf tags are not required.
42
42
# jsonTags:
43
43
# jsonTagRegex: "^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]*)*$" # The default regex is appropriate for our use case.
44
-
# optionalOrRequired:
45
-
# preferredOptionalMarker: optional | kubebuilder:validation:Optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`.
46
-
# preferredRequiredMarker: required | kubebuilder:validation:Required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`.
47
44
# requiredFields:
48
45
# pointerPolicy: Warn | SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers.
49
46
@@ -58,7 +55,7 @@ issues:
58
55
max-issues-per-linter: 0
59
56
exclude-rules:
60
57
# KAL should only run on API folders.
61
-
- path-except: "api/*"
58
+
- path-except: "api//*"
62
59
linters:
63
60
- kal
64
61
- path: "api/v1beta1/*|api/v1alpha1/*"
@@ -73,3 +70,7 @@ issues:
73
70
text: "field Prefix should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
0 commit comments