-
Notifications
You must be signed in to change notification settings - Fork 129
/
.golangci.yml
119 lines (118 loc) · 2.73 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
run:
timeout: 10m
build-tags:
- integration
linters:
enable:
- asciicheck
- dogsled
- durationcheck
- exhaustive
- copyloopvar
- gci
- goconst
- gofmt
- gofumpt
- goimports
- gomodguard
- gosec
- govet
- importas
- lll
- gosimple
- staticcheck
- unused
- misspell
- nakedret
- nilerr
- nolintlint
- predeclared
- prealloc
- revive
- stylecheck
- unconvert
- unparam
- wastedassign
- errorlint
issues:
max-same-issues: 0
exclude-rules:
- linters:
- gosec
text: "weak cryptographic primitive"
path: "state/indexers/md5Indexer.*"
- linters:
- gosec
text: "TLS MinVersion too low"
path: "tests/integration/"
- linters:
- gosec
text: "weak random number generator"
path: _test\.go
- linters:
- errcheck
text: "Error return value" # ignore err not checked in test files
path: _test\.go
- linters:
- gosec
text: "Expect WriteFile permissions to be 0600 or less"
path: file/codegen/main.go
# ignore unused warnings in test utils files
- linters:
- unused
- unparam
path: test_.*
# ignore SA1019 deprecation warning
- linters:
- staticcheck
text: "SA1019: rand..*"
# ignore formatting warnings in cmd/root.go due to nolint statements
- linters:
- gofumpt
text: "File is not `gofumpt`-ed"
path: cmd/root.go
- linters:
- gofmt
text: "File is not `gofmt`-ed with `-s`"
path: cmd/root.go
- linters:
- goimports
text: "File is not `goimports`-ed"
path: cmd/root.go
linters-settings:
gci:
sections:
- standard
- default
goconst:
min-occurrences: 10
gomodguard:
blocked:
modules:
- github.com/ghodss/yaml:
recommendations:
- sigs.k8s.io/yaml
- gopkg.in/yaml.v2:
recommendations:
- sigs.k8s.io/yaml
- gopkg.in/yaml.v3:
recommendations:
- sigs.k8s.io/yaml
- github.com/pkg/errors:
recommendations:
- fmt
- errors
- golang.org/x/net/context:
recommendations:
- context
- github.com/kong/kubernetes-ingress-controller/v3:
recommendations:
- github.com/kong/kubernetes-configuration
- github.com/kong/gateway-operator:
recommendations:
- github.com/kong/kubernetes-configuration
importas:
no-unaliased: true
alias:
- pkg: github.com/kong/kubernetes-configuration/api/configuration/(v[\w\d]+)
alias: configuration${1}