-
Notifications
You must be signed in to change notification settings - Fork 4
/
.golangci.yaml
75 lines (73 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
66
67
68
69
70
71
72
73
74
75
linters:
# Only run explicitly enabled linters
disable-all: true
# The list below includes pretty much all available linters from the "bugs",
# "format", and "performance" categories. However, we don't use most of the
# non-default "style", "comment", or "complexity" linters since they are often
# very opinionated and don't lead to better code per-se.
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- contextcheck
- decorder
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- exportloopref
- forbidigo
- gci
- gocritic
- goerr113
- gofmt
- gofumpt
- goimports
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nilerr
- noctx
- paralleltest
- prealloc
- reassign
- revive
- staticcheck
- testpackage
- typecheck
- unused
- wrapcheck
linters-settings:
forbidigo:
forbid:
- 'fmt\.Errorf' # Use internal errors package instead.
gci:
sections:
- standard
- default
- prefix(github.com/rwx-research)
- dot
wrapcheck:
ignoreSigRegexps:
- errors\.WithDecoration\(
- errors\.New.*Error\(
issues:
exclude-rules:
# Some of the rules can be relaxed for test files
- path: _test\.go
linters:
- wrapcheck
# Comments sometimes _have_ to be longer than the limit (e.g. URLs)
- linters:
- lll
source: "^\\s*// "
# Allow dot-imports for gomega and ginkgo
- linters:
- revive
source: "gomega|ginkgo"