From 046588d8a141088c237bb71f2acfb7fb33309ccc Mon Sep 17 00:00:00 2001 From: sivchari Date: Mon, 3 Mar 2025 19:23:53 +0900 Subject: [PATCH] enable requiredfields linter Signed-off-by: sivchari --- .golangci-kal.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.golangci-kal.yml b/.golangci-kal.yml index 93802b870223..b925f2a960e9 100644 --- a/.golangci-kal.yml +++ b/.golangci-kal.yml @@ -18,10 +18,11 @@ linters-settings: enable: - "conditions" # Ensure conditions have the correct json tags and markers. - "integers" # Ensure only int32 and int64 are used for integers. - - "statussubresource" # All root objects that have a `status` field should have a status subresource. - - "nofloats" # Ensure floats are not used. - "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items. - "nobools" # Bools do not evolve over time, should use enums instead. + - "nofloats" # Ensure floats are not used. + - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`. + - "statussubresource" # All root objects that have a `status` field should have a status subresource. # Per discussion in July 2024, we are keeping phase fields for now. # See https://github.com/kubernetes-sigs/cluster-api/pull/10897#discussion_r1685929508 @@ -32,7 +33,6 @@ linters-settings: # - "commentstart" # Ensure comments start with the serialized version of the field name. # - "jsontags" # Ensure every field has a json tag. # - "optionalorrequired" # Every field should be marked as `+optional` or `+required`. - # - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`. disable: - "*" # We will manually enable new linters after understanding the impact. Disable all by default. lintersConfig: