forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
61 lines (56 loc) · 1.47 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
# See explanation of linters at https://golangci-lint.run/usage/linters/
linters:
disable-all: true
enable:
- bodyclose
- depguard
- gocritic
- goimports
- gosimple
- govet
- ineffassign
- nolintlint
- staticcheck
- typecheck
- unconvert
- unused
linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages-with-error-message:
- errors: 'Use github.com/cockroachdb/errors instead'
- github.com/pkg/errors: 'Use github.com/cockroachdb/errors instead'
- ioutil: 'The ioutil package has been deprecated'
gocritic:
disabled-checks:
- appendAssign # Too many false positives
- assignOp # Maybe worth adding, but likely not worth the noise
- commentFormatting # No strong benefit
- deprecatedComment # Unnecessary
- exitAfterDefer # Only occurs in auxiliary tools
- ifElseChain # Noisy for not much gain
- singleCaseSwitch # Noisy for not much gain
govet:
disable:
- composites
forbidigo:
forbid:
# Use errors.New instead
- 'fmt\.Errorf'
issues:
exclude-rules:
# Exclude bodyclose lint from tests because leaking connections in tests
# is a non-issue, and checking that adds unnecessary noise
- path: _test\.go
linters:
- bodyclose
run:
timeout: 5m
skip-dirs:
- client
- ui
- vendor
- node_modules
skip-files:
- schema/schema.go # Auto-generated with depguard failures