-
Notifications
You must be signed in to change notification settings - Fork 3
/
.golangci.yml
111 lines (108 loc) · 2.65 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
run:
timeout: 5m
linters-settings:
govet:
enable-all: true
disable:
- fieldalignment
gocyclo:
min-complexity: 15
maligned:
suggest-new: true
goconst:
min-len: 5
min-occurrences: 3
misspell:
locale: US
funlen:
lines: -1
statements: 50
godox:
keywords:
- FIXME
gofumpt:
extra-rules: true
depguard:
rules:
main:
deny:
- pkg: "github.com/sirupsen/logrus"
desc: not allowed
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package
gocritic:
enabled-tags:
- diagnostic
- style
- performance
disabled-checks:
- sloppyReassign
- unnamedResult
- hugeParam
- rangeValCopy
- octalLiteral
- paramTypeCombine # already handle by gofumpt.extra-rules
linters:
enable-all: true
disable:
- sqlclosecheck # not relevant (SQL)
- rowserrcheck # not relevant (SQL)
- execinquery # not relevant (SQL)
- cyclop # duplicate of gocyclo
- lll
- dupl
- gomnd
- tparallel
- mnd
- paralleltest
- testpackage
- err113
- wrapcheck
- nlreturn
- wsl
- exhaustive
- exhaustruct
- prealloc
- noctx
- varnamelen
- ireturn
- contextcheck
- varnamelen
- nonamedreturns
- depguard
- perfsprint
- inamedparam
- tagalign
issues:
exclude-use-default: false
max-same-issues: 0
exclude:
- 'ST1000: at least one file in a package should have a package comment'
- 'package-comments: should have a package comment'
- 'G114: Use of net/http serve function that has no support for setting timeouts'
exclude-rules:
- path: version.go
text: '`(version|date|commit)` is a global variable'
- path: .*_test.go
linters:
- funlen
- unused
- maintidx
- path: pkg/handlers/module.go
text: Function 'Download' is too long (.*)
- path: pkg/handlers/module.go
text: Function 'downloadGoProxy' is too long (.*)
- path: pkg/handlers/module.go
text: Function 'downloadGitHub' is too long (.*)
- path: pkg/functions/public.go
text: Function 'Public' is too long (.*)
- path: main.go
text: Function 'serveCommand' is too long (.*)
- path: pkg/handlers/module.go
text: Function 'Download' has too many statements (.*)
- path: cmd/serve/serve.go
text: 'cyclomatic complexity [0-9]* of func `setupEnvVars` is high (.*)'
- path: pkg/db/mongodb/plugindb.go
text: Function 'SearchByName' is too long
- path: internal/token/token.go
text: "json\\(camel\\): got 'userID' want 'userId'"