This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.golangci.yml
152 lines (127 loc) · 2.58 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
run:
concurrency: 4
deadline: 1m
issues-exit-code: 1
tests: false
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
linters:
disable:
- godox
- gochecknoglobals
- gochecknoinits
- lll
- misspell
- depguard
- maligned
- stylecheck
- gofmt
enable:
- govet
- goimports
- gocritic
- gosimple
- gocyclo
- goconst
- gosec
- errcheck
- staticcheck
- golint
- structcheck
- typecheck
- varcheck
- unused
- ineffassign
- deadcode
- unconvert
- interfacer
- funlen
- bodyclose
- whitespace
- scopelint
- prealloc
- nakedret
- dogsled
- unparam
fast: false
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
funlen:
lines: 60
statements: 40
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 2
govet:
check-shadowing: false
# enable or disable analyzers by name
enable:
- atomicalign
enable-all: false
disable:
- shadow
disable-all: false
goimports:
local-prefixes: waitabit,github.com/heartwilltell
gocyclo:
min-complexity: 10
dupl:
threshold: 100
goconst:
min-len: 3
min-occurrences: 3
unused:
check-exported: false
unparam:
check-exported: false
nakedret:
max-func-lines: 30
prealloc:
simple: true
range-loops: true
for-loops: false
gocritic:
# Which checks should be enabled; can't be combined with 'disabled-checks';
# See https://go-critic.github.io/overview#checks-overview
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
# By default list of stable checks is used.
enabled-checks:
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
disabled-checks:
- regexpMust
settings: # settings passed to gocritic
captLocal: # must be valid enabled check name
paramsOnly: true
dogsled:
max-blank-identifiers: 2
whitespace:
multi-if: false
issues:
exclude-rules:
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- path: internal/hmac/
text: "weak cryptographic primitive"
linters:
- gosec
- linters:
- gosec
text: "G104:"
- linters:
- staticcheck
text: "SA9003:"
- linters:
- lll
source: "^//go:generate "
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
new: false