-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
76 lines (69 loc) · 1.44 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
run:
# Timeout for analysis.
# Default: 1m
timeout: 3m
linters-settings:
govet:
check-shadowing: true
gocyclo:
min-complexity: 10
maligned:
suggest-new: true
goimports:
local-prefixes: github.com/golangci/golangci-lint
errcheck:
# Checking of errors in type assertions: `a := b.(MyStruct)`. Default: false.
check-type-assertions: true
funlen:
# Checks the number of lines in a function. Default: 60.
lines: 100
# Checks the number of statements in a function. Default: 40.
statements: 50
linters:
disable-all: true
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- exhaustive
- funlen
- gochecknoinits
- gocritic
- gofumpt
- goimports
- revive
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- noctx
- nolintlint
- rowserrcheck
- exportloopref
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
issues:
# Maximum count of issues with the same text. Default: 3.
max-same-issues: 3
exclude-rules:
- source: "(noinspection|TODO)"
linters: [ godot ]
# Allow reuse of string literals and globals in test files.
- path: _test.go
linters:
- gochecknoglobals
- goconst
# Exclude the funlen linter for tests.
- linters:
- funlen
source: "^func Test"