This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
/
.golangci.yml
74 lines (64 loc) · 2.04 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
70
71
72
73
74
---
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 "github.com/percona-platform/saas" instead
- github.com/percona-platform/platform
# use "gopkg.in/yaml.v3" instead
- gopkg.in/yaml.v2
godot:
capital: true
goimports:
local-prefixes: github.com/percona/pmm-managed
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-managed) # 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
- github.com/percona-platform/dbaas-api
linters:
enable-all: true
disable:
# we don't use Go 1.13 errors wrapping yet
- errorlint
- goerr113
- wrapcheck
- exhaustivestruct # useless
- gochecknoglobals # mostly useless
- gomnd # we are using numbers in many cases
- gomodguard # we are not using modules
- interfacer # deprecated
- maligned # deprecated
- nlreturn # too annoying
- scopelint # too many false positives
- wsl # too annoying
- varnamelen # useless
- funlen # useless
issues:
exclude-use-default: false
exclude:
- 'G104: Errors unhandled' # gas: duplicated errcheck checks
exclude-rules:
- path: _test\.go
linters:
- funlen # tests may be long
- gocognit # triggered by subtests
- testpackage # senseless
- unused # very annoying false positive: https://github.com/golangci/golangci-lint/issues/791