-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
68 lines (65 loc) · 1.61 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
# golangci-lint is a fast Go linters runner.
# https://golangci-lint.run
#
# golangci-lint run
linters:
enable-all: true
disable:
# deprecated
- exportloopref
- depguard # unwanted, as it requires a list of packages
- exhaustive # too much boilerplate
- exhaustruct # too many values in struct literal (opinionated)
- wrapcheck # wrapping 3rd party errors are unnecessary (opinionated)
- varnamelen # doesn't allow short vars (opinionated)
- goimports # conflicts with gci
- nlreturn # opinionated
- wsl # opinionated
linters-settings:
cyclop:
# the maximal code complexity to report
max-complexity: 15
issues:
exclude-rules:
# all test files
- path: '(.+)_test\.go'
linters:
- gocognit
- gochecknoinits
# all cmd files
- path: 'cmd/(.+)\.go'
linters:
- gochecknoglobals
- gochecknoinits
# individual files
- path: main.go
linters:
- gochecknoglobals
- path: cmd/internal/flag/flag.go
linters:
- ireturn
- path: meta/meta.go
linters:
- gochecknoglobals
- path: convert/encoding.go
linters:
- cyclop
- funlen
- ireturn
- path: info/detail.go
linters:
- gosec
- lll
- path: internal/mock/mock.go
linters:
- gosec
- path: logs/logs_test.go
linters:
- goerr113
- path: table/table.go
linters:
- ireturn
- path: xud/xud.go
linters:
- gochecknoglobals
- ireturn