forked from mongodb/mongo-go-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
64 lines (61 loc) · 1.57 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
run:
timeout: 5m
linters:
disable-all: true
# TODO(GODRIVER-2156): Enable all commented-out linters.
enable:
- deadcode
- errcheck
# - errorlint
- goimports
# - gosimple
- govet
- ineffassign
# - misspell
# - nakedret
- revive
- staticcheck
# - structcheck
- typecheck
# - unused
# - unconvert
# - unparam
# - varcheck
linters-settings:
errcheck:
exclude: .errcheck-excludes
govet:
disable:
- cgocall
- composites
staticcheck:
checks: [
"all",
"-SA1019", # Disable deprecation warnings for now.
"-SA1012", # Disable "do not pass a nil Context" to allow testing nil contexts in tests.
]
issues:
exclude:
# Ignore capitalization warning for this weird field name.
- "var-naming: struct field CqCssWxW should be CqCSSWxW"
# Ignore warnings for common "wiremessage.Read..." usage because the safest way to use that API
# is by assigning possibly unused returned byte buffers.
- "SA4006: this value of `wm` is never used"
- "SA4006: this value of `rem` is never used"
- "ineffectual assignment to wm"
- "ineffectual assignment to rem"
skip-dirs-use-default: false
skip-dirs:
- (^|/)vendor($|/)
- (^|/)testdata($|/)
- (^|/)data($|/)
- (^|/)etc($|/)
exclude-rules:
- path: examples/
linters:
- revive
- errcheck
- path: x/mongo/driver/operation/
linters:
- staticcheck # TODO: Re-enable once GODRIVER-2154 is done.
- ineffassign # TODO: Re-enable once GODRIVER-2154 is done.