-
Notifications
You must be signed in to change notification settings - Fork 303
/
.golangci.yaml
95 lines (93 loc) · 2.57 KB
/
.golangci.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
linters:
# Disable all linters.
# Default: false
disable-all: true
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters
enable:
- errcheck
- forbidigo
- unused
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- errcheck
- forbidigo
- linters:
- errcheck
text: "AddEventHandler"
- linters:
- forbidigo
path: pkg/context/context.go$
- linters:
- forbidigo
path: pkg/e2e/fixtures.go$
linters-settings:
errcheck:
exclude-functions:
- (*flag.FlagSet).Parse
- k8s.io/apimachinery/pkg/util/wait.PollUntil
forbidigo:
analyze-types: true
forbid:
# metadata
- p: ^v1.Pod.Annotations$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Pod.OwnerReferences$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Pod.Finalizers$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Pod.ManagedFields$
pkg: ^k8s\.io/api/core/v1$
# Spec
- p: ^v1.PodSpec.Volumes$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodSpec.InitContainers$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodSpec.EphemeralContainers$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodSpec.ImagePullSecrets$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodSpec.HostAliases$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodSpec.SchedulingGates$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodSpec.ResourceClaims$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodSpec.Tolerations$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodSpec.Affinity$
pkg: ^k8s\.io/api/core/v1$
# PodStatus
- p: ^v1.PodStatus.InitContainerStatuses$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodStatus.ContainerStatuses$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.PodStatus.EphemeralContainerStatuses$
pkg: ^k8s\.io/api/core/v1$
# Container
- p: ^v1.Container.Image$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Container.Command$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Container.Args$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Container.EnvFrom$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Container.Env$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Container.Resources$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Container.VolumeMounts$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Container.VolumeDevices$
pkg: ^k8s\.io/api/core/v1$
- p: ^v1.Container.SecurityContext$
pkg: ^k8s\.io/api/core/v1$
# Node
- p: ^v1.NodeStatus.Images$
pkg: ^k8s\.io/api/core/v1$
run:
timeout: 3m