-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
66 lines (61 loc) · 1.56 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
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0.8
gocyclo:
min-complexity: 20
maligned:
suggest-new: true
depguard:
list-type: blacklist
include-go-root: false
packages:
# use git.rrdc.de/lib/errors instead
- errors
- github.com/pkg/errors
# allow logrus only in lg package
- github.com/sirupsen/logrus
- github.com/tehsphinx/dbg
# suppress other packages
- flag
- github.com/namsral/flag
- github.com/bmizerany/assert
lll:
line-length: 150
nakedret:
max-func-lines: 10
linters:
enable:
- golint
- unconvert
- goconst
- gocyclo
- goimports
- maligned
- depguard
- lll
- nakedret
- scopelint
- gocritic
issues:
exclude-rules:
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- gocritic
- depguard
- text: "Using the variable on range scope `tt` in function literal"
linters:
- scopelint
exclude-use-default: false
exclude:
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
# golint: False positive when tests are defined in package 'test'
- func name will be used as test\.Test.* by other packages, and that stutters; consider calling this
# govet: shadowing of err variable
- declaration of "err" shadows declaration at