forked from percona/pmm-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
59 lines (52 loc) · 1.51 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
---
linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages:
# use "github.com/pkg/errors" instead
- errors
# we use "github.com/golang/protobuf/proto" for now
- github.com/gogo/protobuf/proto
- google.golang.org/protobuf/proto
# use only forked parser
- github.com/percona/go-mysql/log/slow
# use "gopkg.in/yaml.v3" instead
- gopkg.in/yaml.v2
goimports:
local-prefixes: github.com/percona/pmm-agent
lll:
line-length: 170
tab-width: 4
unused:
check-exported: true
unparam:
check-exported: true
linters:
enable-all: true
disable:
# keep sorted
- exhaustivestruct # too annoying
- gochecknoglobals # mostly useless
- gomodguard # we are not using modules
- ifshort # false positives: https://github.com/esimonov/ifshort/issues/6, 7
- nlreturn
- scopelint # too many false positives
- wsl # too annoying
run:
skip-dirs:
- agents/mongodb/internal/
issues:
exclude-use-default: false
exclude:
# gas: Duplicated errcheck checks
- 'G104: Errors unhandled'
exclude-rules:
- path: _test\.go
linters:
# keep sorted
- exhaustivestruct # very annoying
- funlen # tests may be long
- gomnd # tests are full of magic numbers
- testpackage # senseless
- unused # very annoying false positive: https://github.com/golangci/golangci-lint/issues/791