Skip to content

Commit fac56b1

Browse files
committed
lint/golangci-lint: update .golangci.yml config
1 parent 28c6290 commit fac56b1

File tree

1 file changed

+23
-42
lines changed

1 file changed

+23
-42
lines changed

.golangci.yml

Lines changed: 23 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,74 @@
11
run:
2-
concurrency: 4
2+
concurrency: 12
33
deadline: 5m
44
issues-exit-code: 1
55
tests: true
6+
# skip-dirs:
67
skip-files:
78
- ".*\\.pb\\.go"
8-
- ".*\\.gen\\.go"
9+
- ".*(.|_)gen\\.go"
10+
modules-download-mode: vendor
911

1012
linters-settings:
1113
depguard:
1214
list-type: blacklist
1315
include-go-root: false
1416
packages:
1517
- github.com/davecgh/go-spew/spew
16-
dupl:
17-
threshold: 100
1818
errcheck:
1919
check-type-assertions: true
2020
check-blank: true
2121
# exclude: .errcheckignore
2222
goconst:
2323
min-len: 3
2424
min-occurrences: 3
25-
gocyclo:
26-
min-complexity: 10
2725
gofmt:
2826
simplify: true
2927
goimports:
30-
# local-prefixes: github.com/
28+
local-prefixes: github.com/go-language-server/jsonrpc2/
3129
golint:
3230
min-confidence: 0.3
3331
govet:
3432
check-shadowing: false
35-
maligned:
36-
suggest-new: true
33+
gocritic:
34+
enabled-tags:
35+
- diagnostic
36+
- style
37+
- performance
38+
- experimental
39+
settings:
40+
captLocal:
41+
paramsOnly: true
42+
rangeValCopy:
43+
sizeThreshold: 32
3744
misspell:
3845
locale: US
3946
nakedret:
4047
max-func-lines: 30
4148
prealloc:
4249
simple: true
43-
range-loops: true # Report preallocation suggestions on range loops, true by default
44-
for-loops: false # Report preallocation suggestions on for loops, false by default
50+
range-loops: true
51+
for-loops: false
4552
unparam:
4653
algo: cha
47-
check-exported: false
54+
check-exported: true
4855
unused:
49-
check-exported: false
56+
check-exported: true
5057

5158
linters:
5259
enable:
53-
- deadcode
54-
- depguard
55-
- errcheck
56-
- goconst
57-
- gocritic
58-
- gofmt
59-
- goimports
60-
- golint
61-
- gosimple
62-
- govet
63-
- ineffassign
64-
- interfacer
65-
- maligned
66-
- misspell
67-
- nakedret
68-
- prealloc
69-
- scopelint
70-
- staticcheck
71-
- structcheck
72-
- unconvert
73-
- unparam
74-
- unused
75-
- varcheck
76-
enable-all: false
60+
enable-all: true
7761
disable:
7862
- dupl
7963
- gochecknoglobals
8064
- gochecknoinits
8165
- gocyclo
8266
- gosec
8367
- lll
68+
- maligned
8469
- megacheck
8570
- typecheck
86-
disable-all: false
87-
presets:
88-
- bugs
89-
- unused
90-
fast: false
71+
fast: true
9172

9273
issues:
9374
exclude-use-default: false

0 commit comments

Comments
 (0)