This repository has been archived by the owner on Aug 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.golangci.yml
69 lines (60 loc) · 1.85 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
66
67
68
69
---
linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages:
# use "github.com/pkg/errors" instead
- errors
# we use "google.golang.org/protobuf/proto"
- github.com/golang/protobuf/proto
- github.com/gogo/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
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/pmm-agent) # Groups all local imports.
lll:
line-length: 170
tab-width: 4
unused:
check-exported: true
unparam:
check-exported: true
gomoddirectives:
replace-allow-list:
- github.com/percona/pmm
linters:
enable-all: true
disable:
# keep sorted
- exhaustivestruct # too annoying
- gochecknoglobals # mostly useless
- gomoddirectives # we use replace directives
- 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