|
6 | 6 | linters: |
7 | 7 | disable-all: true |
8 | 8 | enable: |
9 | | - - kal # linter for Kube API conventions |
| 9 | + - kubeapilinter # linter for Kube API conventions |
10 | 10 |
|
11 | 11 | linters-settings: |
12 | 12 | custom: |
13 | | - kal: |
| 13 | + kubeapilinter: |
14 | 14 | type: "module" |
15 | | - description: KAL is the Kube-API-Linter and lints Kube like APIs based on API conventions and best practices. |
| 15 | + description: kube-api-linter and lints Kube like APIs based on API conventions and best practices. |
16 | 16 | settings: |
17 | 17 | linters: |
18 | 18 | enable: |
@@ -61,54 +61,54 @@ issues: |
61 | 61 | # KAL should only run on API folders. |
62 | 62 | - path-except: "api//*" |
63 | 63 | linters: |
64 | | - - kal |
| 64 | + - kubeapilinter |
65 | 65 | - path: "api/v1beta2/*|api/addons/v1beta2/*|api/v1beta1/*|api/v1alpha1/*|api/addons/v1beta1/*" |
66 | 66 | text: "Conditions field must be a slice of metav1.Condition" |
67 | 67 | linters: |
68 | | - - kal |
| 68 | + - kubeapilinter |
69 | 69 | - path: "api/v1beta2/*|api/v1beta1/*" |
70 | 70 | text: "type ClusterIPFamily should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements" |
71 | 71 | linters: |
72 | | - - kal |
| 72 | + - kubeapilinter |
73 | 73 | - path: "exp/ipam/api/v1beta2/*|exp/ipam/api/v1alpha1/*|exp/ipam/api/v1beta1/*" |
74 | 74 | text: "field Prefix should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements" |
75 | 75 | linters: |
76 | | - - kal |
| 76 | + - kubeapilinter |
77 | 77 | # clusterctl and Runtime Hooks can be fixed once we bump their apiVersion. |
78 | 78 | - path: "cmd/clusterctl/api/v1alpha3|exp/runtime/hooks/api/v1alpha1" |
79 | 79 | text: "maxlength" |
80 | 80 | linters: |
81 | | - - kal |
| 81 | + - kubeapilinter |
82 | 82 | # controller-gen does not allow to add MaxItems to Schemaless fields |
83 | 83 | - path: "api/v1beta2/*|api/v1beta1/*" |
84 | 84 | text: "maxlength: field (AllOf|OneOf|AnyOf) must have a maximum items, add kubebuilder:validation:MaxItems marker" |
85 | 85 | linters: |
86 | | - - kal |
| 86 | + - kubeapilinter |
87 | 87 | # It does not make sense to add a maxItems marker on the *List structs as they are not used to generate CRD YAMLs. |
88 | | - # This exclude will be removed once https://github.com/JoelSpeed/kal/issues/38 is resolved. |
| 88 | + # This exclude will be removed once https://github.com/JoelSpeed/kubeapilinter/issues/38 is resolved. |
89 | 89 | - path: "api/v1beta2/*|api/addons/v1beta2/*|api/v1beta1/*|api/v1alpha1/*|api/addons/v1beta1/*" |
90 | 90 | text: "maxlength: field Items must have a maximum items, add kubebuilder:validation:MaxItems marker" |
91 | 91 | linters: |
92 | | - - kal |
| 92 | + - kubeapilinter |
93 | 93 | - path: "api/v1beta2/*|api/addons/v1beta2/*|api/v1alpha1/*|api/v1beta1/*|api/addons/v1beta1/*" |
94 | 94 | text: "nobools" |
95 | 95 | linters: |
96 | | - - kal |
| 96 | + - kubeapilinter |
97 | 97 | # We follow the current CustomResourceDefinition field's json tag pattern. |
98 | 98 | - path: "api/v1beta2/*|api/v1beta1/*" |
99 | 99 | text: "field (XPreserveUnknownFields|XPreserveUnknownFields|XValidations|XMetadata|XIntOrString) json tag does not match pattern" |
100 | 100 | linters: |
101 | | - - kal |
| 101 | + - kubeapilinter |
102 | 102 | # The following rules are disabled until we migrate to the new API. |
103 | 103 | - path: "bootstrap/kubeadm/api/v1beta2/kubeadm_types.go|bootstrap/kubeadm/api/v1beta1/kubeadm_types.go" |
104 | 104 | text: "field Token is marked as required, should not be a pointer" |
105 | 105 | linters: |
106 | | - - kal |
| 106 | + - kubeapilinter |
107 | 107 | - path: "api/v1beta2/clusterclass_types.go|api/v1beta1/clusterclass_types.go" |
108 | 108 | text: "field Ref is marked as required, should not be a pointer" |
109 | 109 | linters: |
110 | | - - kal |
| 110 | + - kubeapilinter |
111 | 111 | - path: "api/v1beta2/*|api/addons/v1beta2/*|api/v1alpha1/*|api/v1beta1/*|api/v1alpha3/*|api/addons/v1beta1/*" |
112 | 112 | text: "field Items must be marked as optional or required" |
113 | 113 | linters: |
114 | | - - kal |
| 114 | + - kubeapilinter |
0 commit comments