-
Notifications
You must be signed in to change notification settings - Fork 4
/
golangci.yml
60 lines (54 loc) · 1.26 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
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 5m
# do not include test
tests: false
modules-download-mode: readonly
linters:
disable-all: true
enable:
- dupl
- goconst
- gocyclo
- gofmt
- revive
- govet
- ineffassign
- lll
- misspell
- nakedret
- unparam
- errcheck
- goimports
- megacheck
- govet
- unused
# all available settings of specific linters
linters-settings:
errcheck:
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default.
check-type-assertions: false
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: true
govet:
# report about shadowed variables
check-shadowing: false
revive:
min-confidence: 0.8
gocyclo:
min-complexity: 16
dupl:
# tokens count to trigger issue, 150 by default
threshold: 150
goconst:
# minimal length of string constant, 3 by default
min-len: 3
# minimal occurrences count to trigger, 3 by default
min-occurrences: 3
lll:
line-length: 200
tab-width: 1
issues:
new: true