-
Notifications
You must be signed in to change notification settings - Fork 806
/
Copy path.golangci.yml
71 lines (71 loc) · 2.25 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
version: "2"
run:
modules-download-mode: vendor
linters:
enable:
- contextcheck
- durationcheck
- forbidigo
- ginkgolinter
- gocritic
- misspell
- nonamedreturns
- predeclared
- revive
- unconvert
- unparam
- wastedassign
disable:
- errcheck
settings:
forbidigo:
forbid:
# Copied from https://github.com/moby/moby/pull/48407
- pattern: ^netlink\.(Handle\.)?(AddrList|BridgeVlanList|ChainList|ClassList|ConntrackTableList|ConntrackDeleteFilter$|ConntrackDeleteFilters|DevLinkGetDeviceList|DevLinkGetAllPortList|DevlinkGetDeviceParams|FilterList|FouList|GenlFamilyList|GTPPDPList|LinkByName|LinkByAlias|LinkList|LinkSubscribeWithOptions|NeighList$|NeighProxyList|NeighListExecute|NeighSubscribeWithOptions|LinkGetProtinfo|QdiscList|RdmaLinkList|RdmaLinkByName|RdmaLinkDel|RouteList|RouteListFilteredIter|RuleListFiltered$|RouteSubscribeWithOptions|RuleList$|RuleListFiltered|SocketGet|SocketDiagTCPInfo|SocketDiagTCP|SocketDiagUDPInfo|SocketDiagUDP|UnixSocketDiagInfo|UnixSocketDiag|VDPAGetDevConfigList|VDPAGetDevList|VDPAGetMGMTDevList|XfrmPolicyList|XfrmStateList)
pkg: ^github.com/vishvananda/netlink$
msg: Use internal netlinksafe package for EINTR handling.
analyze-types: true
staticcheck:
checks:
- all
- '-QF1008' # nested struct reference
- '-ST1005' # capitalized error strings
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- revive
- staticcheck
text: use ALL_CAPS in Go names; use CamelCase
- linters:
- revive
text: ' and that stutters;'
- path: (.+)_test\.go
text: 'dot-imports: should not use dot imports'
- path: (.+)_test\.go
text: "ginkgo-linter: wrong comparison assertion. Consider using (.+)BeZero(.+)"
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- prefix(github.com/containernetworking)
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$