forked from openshift-kni/eco-goinfra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
153 lines (147 loc) · 4.16 KB
/
.golangci.yml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
run:
go: 1.23
timeout: 15m0s
skip-dirs-use-default: true
fast: false
# modules-download-mode: readonly
linters-settings:
depguard:
rules:
main:
allow:
- "k8s.io/apimachinery"
- "k8s.io/api"
- "k8s.io/kubectl/pkg/drain"
- "k8s.io/kubelet"
- "k8s.io/utils"
- "k8s.io/client-go"
- "github.com/Masterminds/semver/v3"
- "github.com/onsi/ginkgo"
- "github.com/openshift"
- "github.com/nmstate/kubernetes-nmstate"
- "github.com/k8snetworkplumbingwg"
- "github.com/metallb/metallb-operator"
- "github.com/metal3-io/baremetal-operator"
- "github.com/operator-framework/operator-lifecycle-manager"
- "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/egressservice/v1"
- "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/egressip/v1"
- "github.com/grafana-operator/grafana-operator"
- "github.com/kedacore/keda-olm-operator/apis/keda/v1alpha1"
- "github.com/kube-object-storage/lib-bucket-provisioner/pkg/apis/objectbucket.io/v1alpha1"
- "github.com/kedacore/keda/v2/apis/keda/v1alpha1"
- "github.com/grafana/loki/operator/apis/loki/v1"
- "github.com/NVIDIA/gpu-operator/"
- "github.com/operator-framework/api"
- "github.com/argoproj-labs/argocd-operator/api"
- "github.com/golang/glog"
- "github.com/rh-ecosystem-edge/kernel-module-management/"
- "maistra.io/api/"
- "open-cluster-management.io/governance-policy-propagator/api"
- "open-cluster-management.io/governance-policy-propagator/api/v1beta1"
- "open-cluster-management.io/multicloud-operators-subscription/pkg/apis/apps/placementrule/v1"
- "open-cluster-management.io/api"
- "github.com/stolostron/klusterlet-addon-controller/pkg/apis"
- "sigs.k8s.io/controller-runtime"
- "github.com/stretchr/testify"
- $gostd
- "github.com/stretchr/testify"
- "github.com/vmware-tanzu/velero"
- "github.com/kelseyhightower/envconfig"
- "github.com/red-hat-storage/ocs-operator"
- "github.com/red-hat-storage/odf-operator"
- "github.com/stmcginnis/gofish"
- "github.com/prometheus-operator/prometheus-operator"
govet:
disable:
- printf
revive:
rules:
- name: indent-error-flow
- name: var-naming
- name: increment-decrement
- name: exported
arguments:
- disableStutteringCheck
wsl:
strict-append: false
gofmt:
simplify: true
funlen:
lines: 90
statements: 40
unused:
check-exported: true
go: "1.23"
staticcheck:
# https://staticcheck.io/docs/options#checks
checks:
- all
- "-SA1006"
stylecheck:
# https://staticcheck.io/docs/options#checks
checks:
- all
- ST1001
linters:
enable:
- asciicheck
- bidichk
- depguard
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
- forcetypeassert
- funlen
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- gofmt
- goheader
- goimports
- gomodguard
- goprintffuncname
- gosimple
- govet
- importas
- ineffassign
- ireturn
- lll
- makezero
- misspell
- nakedret
- nilnil
- nolintlint
- predeclared
- promlinter
- revive
- staticcheck
- stylecheck
- tenv
- thelper
- typecheck
- unconvert
- unparam
- unused
- varnamelen
- wsl
- nlreturn
output:
formats: colored-line-number
issues:
exclude-dirs:
- pkg/schemes
include:
- EXC0002 # disable excluding of issues about comments from golint
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments
exclude-rules:
#- # Exclude some linters from running on tests files.
- path: 'pkg/polarion'
linters:
- exhaustive