-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.golangci.yaml
More file actions
178 lines (178 loc) · 5.46 KB
/
.golangci.yaml
File metadata and controls
178 lines (178 loc) · 5.46 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
version: "2"
run:
build-tags:
- integration
linters:
default: none
# One can't use disable and disable-all. disable-all is preferred to avoid lint failing when golangci gets updated and linters are added.
# at the same time but it is nice to explicitly state which linters we do not want.
#disable:
# - containedctx # Context.Context within a struct (as opposed to a func parameter) is nasty for many reasons, but actually sometimes useful.
# - contextcheck # Not that useful/false positives.
# - cyclop # Cyclo complexity already calculated by other linters.
# - dogsled # Could be nice in the future.
# - dupl # Could be nice in the future.
# - err113 # Could be nice in the future.
# - exhaustive # Not that useful/false positives.
# - exhaustruct # Not that useful/false positives.
# - forcetypeassert # We want a panic in situations when a type is asserted.
# - funcorder # Not that useful.
# - funlen # We really like long functions.
# - gochecknoglobals # We need globals.
# - gochecknoinits # We have a lot of those.
# - gocognit # Not that useful/false positives.
# - godox # Not that useful/false positives.
# - gomoddirectives # Not that useful/false positives.
# - inamedparam # Not that useful.
# - interfacebloat # We do bloaty interfaces.
# - ireturn # Not that useful/false positives.
# - mnd # The annoy is strong.
# - nakedret # Naked return good return.
# - nlreturn # Could be nice in the future.
# - nonamedreturns # Named return good return.
# - recvcheck # Could be nice in the future.
# - tagliatelle # Reports issues that are not right for us.
# - testpackage # Whitebox testing is fine too.
# - usetesting # Would be nice to have.
# - varnamelen # Not that useful/false positives.
# - wrapcheck # Not that useful/false positives.
# - wsl # Not that useful/false positives.
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- copyloopvar
- decorder
- depguard
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exptostd
- fatcontext
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- goconst
- gocritic
- gocyclo
- godot
- goheader
- gomodguard
- goprintffuncname
- gosec
- gosmopolitan
- govet
- grouper
- iface
- importas
- ineffassign
- intrange
- lll
- loggercheck
- maintidx
- makezero
- mirror
- misspell
- musttag
- nestif
- nilerr
- nilnesserr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- paralleltest
- perfsprint
- prealloc
- predeclared
- promlinter
- protogetter
- reassign
- revive
- rowserrcheck
- sloglint
- spancheck
- sqlclosecheck
- staticcheck
- tagalign
- testableexamples
- testifylint
- thelper
- tparallel
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
- zerologlint
settings:
depguard:
rules:
xcontext:
deny:
- pkg: golang.org/x/net/context
desc: use context package
gosec:
excludes:
- G115
- G204
- G301
- G302
- G304
- G306
- G601
- G602
exclusions:
generated: lax
rules:
- linters:
- lll
source: ^//( ?)[+]kubebuilder
- linters:
- lll
source: "^\t*//( ?)http(s?)://"
- linters:
- paralleltest
path: integration\/.+\.go
- path: internal/
text: ((comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)|exported (.+) should have comment( \(or a comment on this block\))? or be unexported|package comment should be of the form "(.+)...|comment on exported (.+) should be of the form "(.+)..."|should have a package comment)
- path: cmd/
text: ((comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)|exported (.+) should have comment( \(or a comment on this block\))? or be unexported|package comment should be of the form "(.+)...|comment on exported (.+) should be of the form "(.+)..."|should have a package comment)
- path: integration/
text: ((comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)|exported (.+) should have comment( \(or a comment on this block\))? or be unexported|package comment should be of the form "(.+)...|comment on exported (.+) should be of the form "(.+)..."|should have a package comment)
paths:
- internal/packages/internal/packagekickstart/rukpak
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gofmt
- gofumpt
- goimports
settings:
goimports:
local-prefixes:
- package-operator.run
gofmt:
simplify: true
rewrite-rules:
- pattern: interface{}
replacement: any
exclusions:
generated: lax
paths:
- internal/packages/internal/packagekickstart/rukpak
- third_party$
- builtin$
- examples$