-
Notifications
You must be signed in to change notification settings - Fork 141
/
.golangci.toml
82 lines (71 loc) · 2.2 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
[run]
timeout = "5m"
[linters-settings]
[linters-settings.govet]
check-shadowing = true
[linters-settings.golint]
min-confidence = 0.0
[linters-settings.gocyclo]
min-complexity = 15.0
[linters-settings.gocognit]
min-complexity = 15.0
[linters-settings.goconst]
min-len = 3.0
min-occurrences = 3.0
[linters-settings.misspell]
locale = "US"
[linters-settings.stylecheck]
checks = ["all", "-ST1000"]
[linters-settings.gomoddirectives]
replace-allow-list = [
"github.com/abbot/go-http-auth",
"github.com/go-check/check",
"github.com/gorilla/mux",
"github.com/mailgun/minheap",
]
[linters]
enable-all = true
disable = [
"sqlclosecheck", # Not relevant (SQL)
"rowserrcheck", # Not relevant (SQL)
"ifshort", # Deprecated
"interfacer", # Deprecated
"golint", # Deprecated
"maligned", # Deprecated
"scopelint", # Deprecated
"cyclop", # Duplicate of gocyclo
"lll", # Long lines are ok.
"dupl", # Not relevant
"prealloc", # Not relevant
"gochecknoinits", # Too strict
"gochecknoglobals", # Too strict
"gomnd", # Does not allow for any config or time values
"gosec", # Does not allow exec.Command with variable
"bodyclose", # Too many false positives
"goconst", # Too many false positives
"wrapcheck", # Too strict
"goerr113", # Forces wrapping all errors
"noctx", # Too strict
"exhaustive", # Too strict
"exhaustivestruct", # Too strict
"exhaustruct", # Duplicate of exhaustivestruct
"nlreturn", # Too strict
"ireturn", # Not relevant
"varnamelen", # Not relevant
"nilnil", # Not relevant
"testpackage", # Does not allow testing private funcs
"tparallel", # Not relevant
"paralleltest", # Not relevant
"forcetypeassert", # Too strict
"nonamedreturns", # Not relevant
"structcheck", # Duplicate of unused
"funlen",
]
[issues]
exclude-use-default = false
max-per-linter = 0
max-same-issues = 0
exclude = [
"Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked",
"should have a package comment, unless it's in another file for this package",
]