forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
51 lines (45 loc) · 2.19 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
run:
skip-files:
- cmd/agent/app/reloadcheck.go # ignore unused command for now
- cmd/agent/app/listchecks.go # ignore unused command for now
- pkg/util/cloudfoundry/bbscache_test.go # implements interface from imported package whose method names fail linting
skip-dirs:
# ignore test helper
- pkg/util/testutil
# TODO APM
- pkg/trace
# TODO metrics-aggregation
- pkg/quantile
# TODO burito
- pkg/ebpf
- pkg/procmatch
- cmd/process-agent
- cmd/system-probe
issues:
exclude:
- "`eventContext` is unused"
- "`\\(\\*DatadogLogger\\).changeLogLevel` is unused"
- "`defaultRetryDuration` is unused" # used by APM and Process
- "`defaultRetries` is unused" # used by APM and Process
- "python._Ctype_char, which can be annoying to use" # ignore warning abour returning unexported field from CGO
# [Golint] Ignore package name repetition for checks since it makes code easier to read/maintain
- "type name will be used as jmx.JMXCheck by other packages, and that stutters"
- "type name will be used as jmx.JMXCheckLoader by other packages, and that stutters"
- "type name will be used as python.PythonCheck by other packages, and that stutters"
- "type name will be used as python.PythonStatsEntry by other packages, and that stutters"
- "type name will be used as python.PythonStats by other packages, and that stutters"
- "type name will be used as python.PythonCheckLoader by other packages, and that stutters"
# ignore warning on linux about fields used only on windows
- "`context` is unused"
- "`id` is unused"
linters:
disable-all: true
enable:
- deadcode # Finds unused code
- structcheck # Finds unused struct fields
- unconvert # Remove unnecessary type conversions
- unused # Checks Go code for unused constants, variables, functions and types
- ineffassign # Detects when assignments to existing variables are not used
- misspell # Finds commonly misspelled English words in comments
- gofmt # Gofmt checks whether code was gofmt-ed
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes