-
Notifications
You must be signed in to change notification settings - Fork 124
/
.golangci.yml
151 lines (124 loc) · 2.65 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
151
# See https://golangci-lint.run/usage/configuration/#config-file
run:
deadline: 10m
build-tags:
- integration
linters-settings:
govet:
# report about shadowed variables
shadow: true
revive:
severity: warning
confidence: 0.8
gosec:
excludes:
- G115
- G301
- G306
gosimple:
excludes:
- S1009
lll:
# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
line-length: 120
# tab width in spaces. Default to 1.
tab-width: 1
nilnil:
checked-types:
- func
- iface
- map
- chan
misspell:
locale: UK
ignore-words:
- gossamer
- flavor
- finalized
- finalize
- initialize
- color
linters:
enable:
- bodyclose
- errcheck
- goconst
- gocyclo
- gofmt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nilerr
- nilnil
- nolintlint
- revive
- staticcheck
- tparallel
- unconvert
- unparam
- usestdlibvars
- unused
issues:
exclude-files:
- .*mock_.*\.go
- .*mocks\/.*\.go
exclude-rules:
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- ineffassign
- text: "exported: exported var Err*"
linters:
- revive
- text: "exported: exported method [a-zA-Z]*.MarshalJSON should have comment or be unexported"
linters:
- revive
- text: 'shadow: declaration of "err" shadows declaration*'
linters:
- govet
- text: 'shadow: declaration of "ok" shadows declaration*'
linters:
- govet
- text: 'printf: non-constant format*'
linters:
- govet
- text: 'return both a `nil` error and an invalid value*'
linters:
- nilnil
- linters:
- revive
text: "package comment should be of the form"
- linters:
- nolintlint
source: "^//nolint:revive"
# Exclude lll issues for long lines with go:generate
- linters:
- lll
source: "^//go:generate "
- linters:
- lll
path: lib/runtime/wasmer/imports\.go
source: "^// extern "
- linters:
- lll
path: lib/runtime/wasmer/imports\.go
source: '{"ext_.+", ext_.+, C.ext_.+},$'
- source: "// https://"
linters:
- lll
- source: "// See https://"
linters:
- lll
- text: "G204: Subprocess launched with variable"
linters:
- gosec
exclude-use-default: false