forked from signalfx/signalfx-agent
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yml
67 lines (59 loc) · 1.8 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
issues:
max-same-issues: 0
max-per-linter: 0
exclude-rules:
# We use certain values repeatedly in different test cases. Using consts would only
# reduce clarity.
- linters:
- goconst
path: _test\.go
# Test code can do weird things with context in BeforeEach
- text: cancel
path: _test\.go
linters:
- govet
# There are many places where we let users set TLS InsecureSkipVerify from
# config
- text: G402
linters:
- gosec
# command arguments aren't so bad
- text: G204
linters:
- gosec
# pprof endpoint is only exposed when profiling: true
- text: G108
linters:
- gosec
- path: internal/monitors/kubernetes/cluster/metrics
linters:
- goconst
linters:
enable-all: true
disable:
# Line length is only a problem if it impedes readability, which should be
# determined at code review time.
- lll
# We use init funcs pretty heavily to register montiors at startup
- gochecknoinits
# A lot of config structs have a certain order due to grouping of options
# and they are only allocated once so space optimization isn't important.
- maligned
# This flags things a lot when it is impossible to know how big the backing
# array should be.
- prealloc
# There are many legitimate uses of globals
- gochecknoglobals
- godox
# Too many of these errors to fix in a reasonable amount of time.
- wsl
# TODO: reenable this one after a fix up of the existing code base
- whitespace
# funlen and gocognit are useful in revealing bloated functions, but this
# should be determined at code review as there are many legitimate
# violations.
- funlen
- gocognit
run:
modules-download-mode: readonly
timeout: 5m