-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy path.golangci.yaml
More file actions
172 lines (172 loc) · 3.39 KB
/
Copy path.golangci.yaml
File metadata and controls
172 lines (172 loc) · 3.39 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
version: "2"
run:
build-tags:
- viam_rdk_cgo_have_cxx20_rt
modules-download-mode: readonly
tests: true
linters:
default: standard
enable:
- asciicheck
- bidichk
- bodyclose
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- goheader
- gomoddirectives
- gomodguard_v2
- goprintffuncname
- gosec
- gosmopolitan
- govet
- grouper
- lll
- loggercheck
- mirror
- misspell
- nilerr
- nilnesserr
- noctx
- nolintlint
- promlinter
- reassign
- revive
- rowserrcheck
- sloglint
- sqlclosecheck
- staticcheck
- tagalign
- testableexamples
- testifylint
- unconvert
- unused
- usestdlibvars
- usetesting
- wastedassign
- whitespace
- zerologlint
settings:
errcheck:
check-blank: true
gocritic:
disabled-checks:
- ifElseChain
gomoddirectives:
replace-allow-list:
- github.com/hashicorp/go-getter
gosec:
excludes:
- G104
- G115
# Rules introduced after gosec 2.25, not yet triaged.
- G117
- G118
- G122
- G124
- G703
- G704
- G705
- G710
govet:
disable:
- fieldalignment
- shadow
- composites
- inline
enable-all: true
lll:
line-length: 140
revive:
rules:
- name: blank-imports
- name: context-as-argument
arguments:
- allowTypesBefore: testing.TB,*testing.T,*testing.B,*testing.F
disabled: false
- name: context-keys-type
- name: dot-imports
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: var-declaration
- name: var-naming
arguments:
- [] # AllowList
- [] # DenyList
- - skip-package-name-collision-with-go-std: true
skip-package-name-checks: true
staticcheck:
checks:
- all
- -SA4006
- -ST1000
- -ST1003
- -ST1005
- -ST1016
- -ST1020
- -ST1021
- -ST1022
- -QF1008
- -QF1001
- -QF1002
- -QF1003
- -QF1005
- -QF1006
- -QF1012
exclusions:
generated: lax
rules:
- linters:
- dupword
- errcheck
- exhaustive
- goconst
- gosec
path: _test\.go$
- linters:
- lll
path: /doc.go$
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- prefix(go.viam.com/rdk)
gofumpt:
extra-rules: true
exclusions:
generated: lax
paths:
- '^cli/module_generate/_templates/'