1
1
run :
2
- timeout : 1m
2
+ timeout : 5m
3
3
issues-exit-code : 1
4
4
tests : true
5
5
skip-dirs : []
6
6
skip-dirs-use-default : true
7
- skip-files :
8
- - " .*\\ .pb\\ .go"
9
- - " .*(.|_)gen\\ .go"
10
- modules-download-mode : vendor
11
- allow-parallel-runners : true
7
+ skip-files : []
8
+ allow-parallel-runners : false
12
9
13
10
output :
14
11
format : colored-line-number
15
12
print-issued-lines : true
16
13
print-linter-name : true
17
14
uniq-by-line : true
15
+ sort-results : true
18
16
19
17
linters-settings :
20
18
dupl :
@@ -24,20 +22,23 @@ linters-settings:
24
22
check-blank : true
25
23
exclude : .errcheckignore
26
24
funlen :
27
- lines : 60
28
- statements : 40
25
+ lines : 100
26
+ statements : 60
29
27
gocognit :
30
- min-complexity : 10
28
+ min-complexity : 20
31
29
goconst :
32
30
min-len : 3
33
31
min-occurrences : 3
34
32
gocritic :
35
33
enabled-tags :
36
34
- diagnostic
37
- - style
38
- - performance
39
35
- experimental
40
36
- opinionated
37
+ - performance
38
+ - style
39
+ disabled-checks :
40
+ - commentedOutCode
41
+ - whyNoLint
41
42
settings :
42
43
hugeParam :
43
44
sizeThreshold : 80
@@ -47,34 +48,40 @@ linters-settings:
47
48
sizeThreshold : 128
48
49
gocyclo :
49
50
min-complexity : 15
51
+ godot :
52
+ scope : declarations
53
+ capital : false
50
54
gofmt :
51
55
simplify : true
52
- gofumpt :
53
- extra-rules : true
54
56
goimports :
55
- local-prefixes : github.com/
57
+ local-prefixes : go.lsp.dev/jsonrpc2,go.lsp.dev
56
58
golint :
57
59
min-confidence : 0.3
58
60
govet :
59
61
enable-all : true
60
- disable :
61
- - shadow
62
+ check-shadowing : true
62
63
depguard :
63
64
list-type : blacklist
64
- include-go-root : false
65
+ include-go-root : true
66
+ # packages-with-error-message:
67
+ # - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
65
68
lll :
66
69
line-length : 120
67
70
tab-width : 1
68
71
maligned :
69
- suggest-new : false
72
+ suggest-new : true
70
73
misspell :
71
74
locale : US
75
+ ignore-words :
76
+ - cancelled
72
77
nakedret :
73
78
max-func-lines : 30
74
79
prealloc :
75
80
simple : true
76
81
range-loops : true
77
- for-loops : true # default: false
82
+ for-loops : true
83
+ testpackage :
84
+ skip-regexp : ' .*(export)_test\.go'
78
85
unparam :
79
86
check-exported : true
80
87
algo : cha
@@ -86,30 +93,53 @@ linters-settings:
86
93
87
94
linters :
88
95
fast : false
89
- disable-all : true
96
+ disabled :
97
+ - exhaustivestruct # Checks if all struct's fields are initialized
98
+ - forbidigo # Forbids identifiers
99
+ - gci # Gci control golang package import order and make it always deterministic.
100
+ - gochecknoglobals # check that no global variables exist
101
+ - gochecknoinits # Checks that no init functions are present in Go code
102
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
103
+ - goerr113 # Golang linter to check the errors handling expressions
104
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
105
+ - goheader # Checks is file header matches to pattern
106
+ - gomnd # An analyzer to detect magic numbers.
107
+ - gomodguard # Allow and block list linter for direct Go module dependencies.
108
+ - gosec # Inspects source code for security problems
109
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
110
+ - paralleltest # paralleltest detects missing usage of t.Parallel() method in your Go test
111
+ - scopelint # Scopelint checks for unpinned variables in go programs
112
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
113
+ - testpackage
114
+ - wsl # Whitespace Linter
90
115
enable :
116
+ - asciicheck
91
117
- bodyclose
92
118
- deadcode
93
119
- depguard
94
120
- dogsled
95
121
- dupl
96
122
- errcheck
123
+ - errorlint
97
124
- exhaustive
125
+ - exportloopref
98
126
- funlen
99
127
- gocognit
100
128
- goconst
101
129
- gocritic
102
130
- gocyclo
103
131
- godot
104
132
- gofmt
105
- - gofumpt
106
133
- goimports
107
134
- golint
108
135
- goprintffuncname
109
136
- gosimple
110
137
- govet
111
138
- ineffassign
112
139
- interfacer
140
+ - lll # Reports long lines
141
+ - makezero
142
+ - maligned
113
143
- misspell
114
144
- nakedret
115
145
- nestif
@@ -120,53 +150,59 @@ linters:
120
150
- staticcheck
121
151
- structcheck
122
152
- stylecheck
153
+ - thelper
154
+ - tparallel
123
155
- typecheck
124
156
- unconvert
125
157
- unparam
126
158
- unused
127
159
- varcheck
128
160
- whitespace
129
- disabled :
130
- # - asciicheck
131
- # - gochecknoglobals
132
- # - gochecknoinits
133
- # - godox
134
- # - goerr113
135
- # - gomnd
136
- # - gosec
137
- # - maligned
138
- # - scopelint
139
- # - testpackage
140
- # - wsl
161
+ - wrapcheck
141
162
142
163
issues :
164
+ max-same-issues : 0
143
165
exclude-use-default : true
144
166
exclude-rules :
145
167
- path : _test\.go
146
168
linters :
169
+ - errcheck
147
170
- funlen
171
+ - gocognit
172
+ - goconst
173
+ - gocyclo
148
174
- lll
149
- - errcheck
150
- - path : jsonrpc2.go
175
+ - maligned
176
+ - wrapcheck
177
+ - path : " (.*)?_example_test.go"
151
178
linters :
152
- - gocognit
153
- text : " func `.*.Run`"
179
+ - gocritic
180
+ # `TestMain` function is no longer required to call `os.Exit` since Go 1.15.
181
+ # ref: https://golang.org/doc/go1.15#testing
182
+ - text : " SA3000:"
183
+ linters :
184
+ - staticcheck
185
+ # Exclude shadow checking on the variable named err
186
+ - text : " shadow: declaration of \" (err|ok)\" "
187
+ linters :
188
+ - govet
189
+ # fake implements
190
+ - path : fake/fake.go
191
+ linters :
192
+ - errcheck
193
+ # future use
154
194
- path : jsonrpc2.go
155
195
linters :
156
196
- deadcode
157
197
- unused
158
198
- varcheck
159
199
text : " `(reqWaiting|reqDone)` is unused"
200
+ # future use
160
201
- linters :
161
202
- deadcode
162
203
- unused
163
204
- varcheck
164
205
text : " `(codeServerErrorStart|codeServerErrorEnd)` is unused"
165
- - path : jsonrpc2.go
166
- linters :
167
- - funlen
168
- - gocyclo
169
- - gocognit
170
- - path : stream.go
171
- linters :
172
- - gocognit
206
+ # goroutine
207
+ - path : handler.go
208
+ text : " Error return value of `handler` is not checked"
0 commit comments