-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
97 lines (89 loc) · 1.95 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
run:
deadline: 5m
skip-dirs:
- dist
- jenkinsfile
- plans
- test
- vendor
linters-settings:
funlen:
lines: 60
statements: 40
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
gocognit:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/tommartensen/
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0
gosec:
severity: medium
lll:
# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
line-length: 140
linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- exportloopref
# - errcheck
- funlen
# - gochecknoglobals
# - gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gofmt
- goimports
- golint
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
# not enabled: (check with `golangci-lint linters` command)
# - gomnd
# - maligned
# - prealloc
# - wsl
issues:
exclude-rules:
# Exclude test functions from function length rule
- source: "Test.*"
linters:
- funlen
- gocognit
- path: _test\.go
linters:
- lll
- gosec
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0