This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.toml
84 lines (72 loc) · 1.75 KB
/
.golangci.toml
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
# Configuration for golangci-lint
# See https://github.com/golangci/golangci-lint#config-file
# options for analysis running
[run]
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline = "1m"
# all available settings of specific linters
[linters-settings]
[linters-settings.govet]
# report about shadowed variables
check-shadowing = true
[linters-settings.dupl]
# tokens count to trigger issue, 150 by default
threshold = 100
[linters-settings.goconst]
# minimal length of string constant, 3 by default
min-len = 3
# minimal occurrences count to trigger, 3 by default
min-occurrences = 3
[linters-settings.nakedret]
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
max-func-lines = 30
[linters-settings.prealloc]
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
# True by default.
simple = false
# Report preallocation suggestions on range loops, true by default
range-loops = true
# Report preallocation suggestions on for loops, false by default
for-loops = true
[linters]
enable = [
"govet",
"errcheck",
"golint",
"goconst",
"gofmt",
"megacheck",
"misspell"
]
enable-all = false
# delegate staticcheck, unused, gosimple to megacheck
# run slow linters only on CI
# i.e gas, varcheck, ineffassign, deadcode, typecheck, unconvert, unparam, prealloc
disable = [
"dupl",
"staticcheck",
"unused",
"gosimple",
"gas",
"structcheck",
"varcheck",
"ineffassign",
"deadcode",
"typecheck",
"interfacer",
"unconvert",
"gocyclo",
"goimports",
"maligned",
"depguard",
"lll",
"unparam",
"nakedret",
"prealloc"
]
disable-all = false
fast = false
[issues]
exclude=[
'declaration of "(err|ctx)" shadows declaration at'
]