-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.golangci.yml
42 lines (42 loc) · 951 Bytes
/
.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
version: "2"
linters:
enable:
- forbidigo
- gomodguard
- govet
- gocritic
disable:
- depguard
settings:
forbidigo:
forbid:
- pattern: context\.WithCancel(?:Cause)?
msg: Use contextplus.
- pattern: context\.WithTimeout(?:Cause)?
msg: Use contextplus.
- pattern: context\.WithDeadline(?:Cause)?
msg: Use contextplus.
- pattern: errgroup.WithContext
msg: Use contextplus.
gocritic:
disable-all: true
enabled-checks:
- ruleguard
settings:
ruleguard:
rules: "${base-path}/gorules/*.go"
failOn: all
govet:
disable:
# Unkeyed primitive.E and timestamp fields are used extensively in code taken from
# mongosync.
- composites
exclusions:
generated: lax
presets:
- std-error-handling
formatters:
enable:
- gci
- gofmt
- goimports