-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Expand file tree
/
Copy path.golangci.yml
More file actions
97 lines (93 loc) · 2.04 KB
/
.golangci.yml
File metadata and controls
97 lines (93 loc) · 2.04 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
version: "2"
run:
modules-download-mode: readonly
formatters:
enable:
- gofumpt
- goimports
exclusions:
generated: disable
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- decorder
- dogsled
- durationcheck
- errchkjson
- exptostd
- fatcontext
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- goprintffuncname
- grouper
- iface
- inamedparam
- interfacebloat
- makezero
- mirror
- misspell
- nilerr
- nilnesserr
- nolintlint
- nosprintfhostport
- prealloc
- protogetter
- reassign
- recvcheck
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- testableexamples
- unconvert
- unparam
- usestdlibvars
- usetesting
- wastedassign
- whitespace
settings:
forbidigo:
forbid:
# os.Is* error checking functions predate errors.Is. Therefore, they
# only support errors returned by the os package and subtly fail
# to deal with other wrapped error types.
# New code should use errors.Is(err, error-type) instead.
- pattern: ^os\.Is(Exist|NotExist|Permission|Timeout)$
pkg: ^os$
msg: Use errors.Is instead.
analyze-types: true
staticcheck:
checks:
- all
- -ST1003 # https://staticcheck.dev/docs/checks/#ST1003 Poorly chosen identifier.
- -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression.
nolintlint:
require-specific: true
revive:
rules:
- name: unused-parameter
exclusions:
generated: strict
presets:
- comments
- std-error-handling
rules:
- linters:
- recvcheck
path: pkg/k8s.io/
- path: _test\.go
linters:
- prealloc
- linters:
- unused
text: "(rootlessPortSyncR|rootlessPortSyncW)"
issues:
max-issues-per-linter: 0
max-same-issues: 0