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
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ linters:
27
27
# having the `omitempty` value in their `json` tag where appropriate.
28
28
- "optionalorrequired"# Every field should be marked as `+optional` or `+required`.
29
29
- "requiredfields"# Required fields should not be pointers, and should not have `omitempty`.
30
+
- "ssatags"# Ensure array fields have the appropriate listType markers
30
31
- "statusoptional"# Ensure all first children within status should be optional.
31
32
- "statussubresource"# All root objects that have a `status` field should have a status subresource.
32
33
- "uniquemarkers"# Ensure that types and fields do not contain more than a single definition of a marker that should only be present once.
@@ -44,19 +45,21 @@ linters:
44
45
isFirstField: Warn # Require conditions to be the first field in the status struct.
45
46
usePatchStrategy: Forbid # Require conditions to be the first field in the status struct.
46
47
useProtobuf: Forbid # We don't use protobuf, so protobuf tags are not required.
47
-
optionalFields:
48
+
optionalfields:
48
49
pointers:
49
50
preference: WhenRequired # Always | WhenRequired # Whether to always require pointers, or only when required. Defaults to `Always`.
50
51
policy: SuggestFix # SuggestFix | Warn # The policy for pointers in optional fields. Defaults to `SuggestFix`.
51
52
omitempty:
52
53
policy: SuggestFix # SuggestFix | Warn | Ignore # The policy for omitempty in optional fields. Defaults to `SuggestFix`.
53
-
#jsonTags:
54
+
#jsontags:
54
55
# jsonTagRegex: "^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]*)*$" # The default regex is appropriate for our use case.
55
-
#optionalOrRequired:
56
+
#optionalorrequired:
56
57
# preferredOptionalMarker: optional | kubebuilder:validation:Optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`.
57
58
# preferredRequiredMarker: required | kubebuilder:validation:Required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`.
58
-
#requiredFields:
59
+
#requiredfields:
59
60
# pointerPolicy: Warn | SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers.
61
+
# ssatags:
62
+
# listTypeSetUsage: Warn | Ignore # The policy for listType=set usage on object arrays. Defaults to `Warn`.
0 commit comments