This repository has been archived by the owner on Feb 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.golangci.yaml
65 lines (63 loc) · 1.58 KB
/
.golangci.yaml
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
linters-settings:
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
# This test is disabled because it's frequently used with loop control flow.
# Using `switch` would change the target of a `break` and unless a developer
# is responsible they'll end up breaking out of the wrong control structure.
- ifElseChain
# This test flags perfectly valid and necessary use.
- octalLiteral
# This test is disabled because it's an edge case that we have not
# encountered anyone accidentally using (i.e., if you put in a pointer to an
# interface, you actually do need it for some reason).
- ptrToRefParam
# This test provides flagrantly bad advice combined with flawed reasoning.
- rangeValCopy
# Switch statements enhance readability and are generally a better pattern.
- singleCaseSwitch
# This test is also disabled because it's frequently used with loop control
# flow.
- typeAssertChain
settings:
hugeParam:
sizeThreshold: 512
gocyclo:
min-complexity: 20
nolintlint:
allow-leading-space: true
allow-unused: false
require-explanation: false
require-specific: true
linters:
disable-all: true
enable:
- bodyclose
- deadcode
- errcheck
- exportloopref
- gocritic
- gocyclo
- goimports
- gosec
- gosimple
- govet
- ineffassign
- noctx
- nolintlint
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
issues:
exclude-rules:
- path: _test\.go$
linters:
- bodyclose
- noctx