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
description: KAL is the Kube-API-Linter and lints Kube like APIs based on API conventions and best practices.
16
+
settings:
17
+
linters:
18
+
enable:
19
+
# Per discussion in July 2024, we are keeping phase fields for now.
20
+
# See https://github.com/kubernetes-sigs/cluster-api/pull/10897#discussion_r1685929508
21
+
# and https://github.com/kubernetes-sigs/cluster-api/pull/10897#discussion_r1685919394.
22
+
# - "nophase" # Phase fields are discouraged by the Kube API conventions, use conditions instead.
23
+
24
+
# Linters below this line are disabled, pending conversation on how and when to enable them.
25
+
# - "conditions" # Ensure conditions have the correct json tags and markers.
26
+
# - "commentstart" # Ensure comments start with the serialized version of the field name.
27
+
# - "integers" # Ensure only int32 and int64 are used for integers.
28
+
# - "jsontags" # Ensure every field has a json tag.
29
+
# - "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items.
30
+
# - "nobools" # Bools do not evolve over time, should use enums instead.
31
+
# - "optionalorrequired" # Every field should be marked as `+optional` or `+required`.
32
+
# - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`.
33
+
# - "statussubresource" # All root objects that have a `status` field should have a status subresource.
34
+
disable:
35
+
- "*"# We will manually enable new linters after understanding the impact. Disable all by default.
36
+
lintersConfig:
37
+
conditions:
38
+
isFirstField: Warn # Require conditions to be the first field in the status struct.
39
+
usePatchStrategy: Forbid # Conditions should not use the patch strategy on CRDs.
40
+
useProtobuf: Forbid # We don't use protobuf, so protobuf tags are not required.
41
+
# jsonTags:
42
+
# jsonTagRegex: "^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]*)*$" # The default regex is appropriate for our use case.
43
+
# optionalOrRequired:
44
+
# preferredOptionalMarker: optional | kubebuilder:validation:Optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`.
45
+
# preferredRequiredMarker: required | kubebuilder:validation:Required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`.
46
+
# requiredFields:
47
+
# pointerPolicy: Warn | SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers.
48
+
49
+
issues:
50
+
exclude-files:
51
+
- "zz_generated.*\\.go$"
52
+
- "vendored_openapi\\.go$"
53
+
# We don't want to invest time to fix new linter findings in old API types.
0 commit comments