forked from kubernetes-sigs/gateway-api-inference-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci-kal.yml
More file actions
48 lines (48 loc) · 1.81 KB
/
.golangci-kal.yml
File metadata and controls
48 lines (48 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: "2"
linters:
default: none
enable:
- kubeapilinter
settings:
custom:
kubeapilinter:
type: module
description: Kube API LInter lints Kube like APIs based on API conventions and best practices.
settings:
linters:
enable:
- "*"
disable:
- "commentstart"
lintersConfig:
conflictingmarkers:
conflicts:
- name: "default_vs_required"
sets:
- ["default", "kubebuilder:default"]
- ["required", "kubebuilder:validation:Required", "k8s:required"]
description: "A field with a default value cannot be required"
conditions:
isFirstField: Warn # Require conditions to be the first field in the status struct.
usePatchStrategy: Forbid # Forbid patchStrategy markers on the Conditions field.
useProtobuf: Forbid # We don't use protobuf, so protobuf tags are not required.
optionalfields:
pointers:
preference: WhenRequired # Always | WhenRequired # Whether to always require pointers, or only when required. Defaults to `Always`.
policy: SuggestFix # SuggestFix | Warn # The policy for pointers in optional fields. Defaults to `SuggestFix`.
omitempty:
policy: SuggestFix # SuggestFix | Warn | Ignore # The policy for omitempty in optional fields. Defaults to `SuggestFix`.
omitzero:
policy: Forbid # Enforce the `omitempty` route with a pointer for all optional structs.
exclusions:
generated: strict
paths:
- conformance/
paths-except:
- api/
issues:
max-issues-per-linter: 0
max-same-issues: 0
run:
timeout: 5m
tests: false