-
Notifications
You must be signed in to change notification settings - Fork 16
/
.golangci.yml
65 lines (55 loc) · 1.86 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
65
---
# Almost all linters; some of them are optional.
linters-settings:
cyclop:
max-complexity: 15
depguard:
rules:
main:
files:
- $all
- "!$test"
deny:
- pkg: github.com/pkg/errors
desc: use "errors" instead
- pkg: github.com/gogo/protobuf/proto
desc: use "github.com/golang/protobuf/proto" instead
goimports:
local-prefixes: github.com/percona/everest
unused:
check-exported: true
unparam:
check-exported: true
gci:
sections:
- standard # Captures all standard packages if they do not match another section.
- default # Contains all imports that could not be matched to another section type.
- prefix(github.com/percona/everest) # Groups all local imports.
errcheck:
exclude-functions:
- fmt.Fprint
- fmt.Fprintf
- fmt.Fprintln
linters:
enable-all: true
disable:
- err113 # not useful after migration to the standard errors
- exhaustruct # not useful
- godox # fails to be nolint-ed when necessary
- gomnd # not useful
- lll # generated signatures are long
- nlreturn # too many empty lines makes methods too long
- tagalign # not useful
- varnamelen # it's useful sometime to have a one-letter name
- wrapcheck # forces to wrap errors everywhere
- wsl # too many empty lines makes methods too long
- perfsprint # keep the format for consistency
- execinquery # deprecated
- gomoddirectives # we have been forced to use a replacement for k8s.io/client-go, see https://github.com/percona/everest/pull/901
issues:
exclude-use-default: false
exclude-rules:
- path: _test\.go
linters:
- funlen # tests may be long
- testpackage # senseless