-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Copy path.golangci.yml
56 lines (56 loc) · 2.52 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
run:
linters-settings:
govet:
enable-all: true
golint:
min-confidence: 0
linters:
disable-all: true
enable:
- govet
- errcheck
- staticcheck
- unused
- gosimple
- structcheck
- varcheck
- ineffassign
- deadcode
- typecheck
- golint
- gofmt
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-case-sensitive: true
exclude:
# integration/tests/api/event_test.go:66:6: func `waitForStaticEvent` is unused (unused)
# Flaky test skipped.
- waitForStaticEvent
# Initialism or acronyms for fields, vars and types:
- "(struct field|var|type|const) `[A-Z].*` should be `.*`"
# Initialism or acronyms - renaming exported methods and functions can be tricky:
- "(method|func) [A-Z].* should be .*"
# Stuttering affects exported names:
- "type name will be used as .*\\.[A-Z]{1}.* by other packages, and that stutters"
exclude-rules:
# container/containerd/client.go:67:4: SA1019: grpc.WithDialer is deprecated: use WithContextDialer instead. Will be supported throughout 1.x. (staticcheck)
# There are more similar issues in following lines.
- path: container/containerd/client.go
text: "SA1019:"
# utils/cpuload/netlink/netlink.go:102:15: Error return value of `binary.Write` is not checked (errcheck)
# There are more similar issues in this file
- path: utils/cpuload/netlink/netlink.go
text: "Error return value of `binary.Write` is not checked"
# utils/cloudinfo/aws/aws.go:60:28: SA1019: session.New is deprecated: Use NewSession functions to create sessions instead. NewSession has the same functionality as New except an error can be returned when the func is called instead of waiting to receive an error until a request is made. (staticcheck)
- path: utils/cloudinfo/aws/aws.go
text: "SA1019:"
# manager/manager_test.go:277:29: Error return value of `(*github.com/google/cadvisor/container/testing.MockContainerHandler).GetSpec` is not checked (errcheck)
- path: manager/manager_test.go
text: "Error return value of `.{2}github.com/google/cadvisor/container/testing.MockContainerHandler.{1}.GetSpec` is not checked"
# utils/sysinfo/sysinfo.go:208:7: ineffectual assignment to `err` (ineffassign)
- path: utils/sysinfo/sysinfo.go
text: "ineffectual assignment to `err`|SA4006:"
# cache/memory/memory_test.go:81:23: Error return value of `memoryCache.AddStats` is not checked (errcheck)
- path: cache/memory/memory_test.go
text: "Error return value of `memoryCache.AddStats` is not checked"