-
Notifications
You must be signed in to change notification settings - Fork 178
/
.golangci.yml
109 lines (104 loc) · 1.92 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
run:
timeout: 2m
issues:
max-same-issues: 5
max-issues-per-linter: 100
linters:
enable:
# style
- containedctx # struct contains a context
- goconst # strings that should be constants
- misspell
- predeclared # shadows predeclared Go identifier
- stylecheck
- unconvert # unnecessary conversions
# bugs and others...
- contextcheck # function uses a non-inherited context
- dupl # code clone
- errname # erorrs are named correctly
- errorlint # errors not wrapped for 1.13
- exhaustive # check exhaustiveness of enum switch statements
- exportloopref # using loop variable pointer
- gofmt
- gosec # security
- nestif # deeply nested ifs
- nilerr # returns nil even with non-nil error
- prealloc # slices that can be pre-allocated
- revive # golint replacement
- structcheck # unused struct fields
- unparam # unused function params
linters-settings:
govet:
enable-all: true
check-shadowing: true
settings:
shadow:
strict: false
stylecheck:
checks:
- all
initialisms:
# defaults (https://staticcheck.io/docs/configuration/options/#initialisms)
- ACL
- API
- ASCII
- CPU
- CSS
- DNS
- EOF
- GUID
- HTML
- HTTP
- HTTPS
- ID
- IP
- JSON
- QPS
- RAM
- RPC
- SLA
- SMTP
- SQL
- SSH
- TCP
- TLS
- TTL
- UDP
- UI
- GID
- UID
- UUID
- URI
- URL
- UTF8
- VM
- XML
- XMPP
- XSRF
- XSS
- SIP
- RTP
- AMQP
- DB
- TS
# specific
- CID
- CRI
- CTRD
- ETW
- GCS
- GMSA
- HCS
- IO
- LCOW
- LPAC
- LTSC
- MMIO
- OCI
- RX
- TX
- VHD
- VHDX
- VMID
- VPCI
- WCOW