forked from dell/csi-baremetal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
80 lines (74 loc) · 1.85 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
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
linters-settings:
lll:
line-length: 190
funlen:
lines: 180
statements: 70
gocognit:
min-complexity: 60
golint:
# godoc says that one of files from a package should contain package comment.
# but golint has constraint that checks package comment in every file of the package.
# golint developers mention that this is imperfection. https://github.com/golang/lint/blob/master/lint.go#L376
# To prevent this checking set min-confidence level to 0.3
min-confidence: 0.3
linters:
# please, do not use `enable-all`: it is deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
- funlen
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- golint
- gosimple
- govet
- ineffassign
- lll
- megacheck
- misspell
- nakedret
- scopelint
- staticcheck
- structcheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- maligned
- prealloc
- dupl
# don't enable:
# - gosec Because CSI uses lsblk servers for now
# - gochecknoglobals Because of NodeAllocatedDisks map
# - godox CSI now has a lot TODOs in source code
# - wsl
# - stylecheck because it is similar to golint and there is conflict between them
run:
deadline: 15m
timeout: 15m
skip-dirs:
- tests/
- vendor/
- api/
skip-files:
- .*_test.go
- .*.pb.go
# golint is disabled by default in golang-ci because of golang community
issues:
exclude-use-default: false