Skip to content

Commit 75ea09b

Browse files
committed
enable requiredfields linter
Signed-off-by: sivchari <[email protected]>
1 parent d23093a commit 75ea09b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.golangci-kal.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ linters-settings:
1818
enable:
1919
- "conditions" # Ensure conditions have the correct json tags and markers.
2020
- "integers" # Ensure only int32 and int64 are used for integers.
21+
- "requiredfields" # Required fields should not be pointers, and should not have `omitempty`.
2122

2223
# Per discussion in July 2024, we are keeping phase fields for now.
2324
# See https://github.com/kubernetes-sigs/cluster-api/pull/10897#discussion_r1685929508
@@ -30,7 +31,6 @@ linters-settings:
3031
# - "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items.
3132
# - "nobools" # Bools do not evolve over time, should use enums instead.
3233
# - "optionalorrequired" # Every field should be marked as `+optional` or `+required`.
33-
# - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`.
3434
# - "statussubresource" # All root objects that have a `status` field should have a status subresource.
3535
disable:
3636
- "*" # We will manually enable new linters after understanding the impact. Disable all by default.
@@ -44,8 +44,6 @@ linters-settings:
4444
# optionalOrRequired:
4545
# preferredOptionalMarker: optional | kubebuilder:validation:Optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`.
4646
# preferredRequiredMarker: required | kubebuilder:validation:Required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`.
47-
# requiredFields:
48-
# pointerPolicy: Warn | SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers.
4947

5048
issues:
5149
exclude-files:

0 commit comments

Comments
 (0)