Skip to content

Commit 065f159

Browse files
authored
Merge pull request #11847 from JoelSpeed/enable-conditions-kal
🌱 Enable the conditions rule from KAL
2 parents 7232a2c + 4b91abf commit 065f159

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.golangci-kal.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ linters-settings:
1616
settings:
1717
linters:
1818
enable:
19+
- "conditions" # Ensure conditions have the correct json tags and markers.
20+
1921
# Per discussion in July 2024, we are keeping phase fields for now.
2022
# See https://github.com/kubernetes-sigs/cluster-api/pull/10897#discussion_r1685929508
2123
# and https://github.com/kubernetes-sigs/cluster-api/pull/10897#discussion_r1685919394.
2224
# - "nophase" # Phase fields are discouraged by the Kube API conventions, use conditions instead.
2325

2426
# 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.
2627
# - "commentstart" # Ensure comments start with the serialized version of the field name.
2728
# - "integers" # Ensure only int32 and int64 are used for integers.
2829
# - "jsontags" # Ensure every field has a json tag.
@@ -60,3 +61,7 @@ issues:
6061
- path-except: "api/*"
6162
linters:
6263
- kal
64+
- path: "api/v1beta1/*|api/v1alpha1/*"
65+
text: "Conditions field must be a slice of metav1.Condition"
66+
linters:
67+
- kal

0 commit comments

Comments
 (0)