forked from ZaparooProject/go-pn532
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
194 lines (186 loc) · 4.87 KB
/
.golangci.yml
File metadata and controls
194 lines (186 loc) · 4.87 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
version: "2"
run:
go: '1.24'
linters:
enable:
- staticcheck
- errcheck
- gosec
- govet
- unused
- ineffassign
- sqlclosecheck
- rowserrcheck
- revive
- gocritic
- nolintlint
- gocyclo
- funlen
- bodyclose
- nilerr
- unconvert
- usestdlibvars
- errorlint
- exhaustive
- prealloc
- noctx
- nilnil
- errname
- wrapcheck
- gocognit
- cyclop
- nestif
- maintidx
- makezero
- sloglint
- gosmopolitan
- tagliatelle
- testableexamples
- testifylint
- varnamelen
- decorder
- dupl
- goheader
- grouper
- paralleltest
- tparallel
settings:
govet:
enable:
- shadow
- fieldalignment
gocritic:
enabled-tags:
- diagnostic
- style
- performance
gocyclo:
min-complexity: 15
funlen:
lines: 80
statements: 50
prealloc:
simple: true
range-loops: true
for-loops: true
revive:
severity: warning
rules:
- name: argument-limit
arguments: [5]
- name: atomic
- name: bool-literal-in-expr
- name: call-to-gc
- name: cognitive-complexity
arguments: [15]
- name: comment-spacings
- name: confusing-naming
- name: confusing-results
- name: constant-logical-expr
- name: context-as-argument
- name: context-keys-type
- name: cyclomatic
arguments: [15]
- name: datarace
- name: deep-exit
- name: defer
- name: dot-imports
- name: duplicated-imports
- name: early-return
- name: empty-block
- name: empty-lines
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: flag-parameter
- name: function-length
arguments: [50, 0]
- name: function-result-limit
arguments: [3]
- name: get-return
- name: identical-branches
- name: if-return
- name: import-alias-naming
- name: import-shadowing
- name: increment-decrement
- name: indent-error-flow
- name: line-length-limit
arguments: [120]
- name: max-control-nesting
arguments: [3]
- name: modifies-parameter
- name: modifies-value-receiver
- name: nested-structs
- name: optimize-operands-order
- name: range-val-address
- name: range-val-in-closure
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: redundant-build-tag
- name: redundant-import-alias
- name: redundant-test-main-exit
- name: string-of-int
- name: struct-tag
arguments: ["toml,multiline"]
- name: superfluous-else
- name: time-date
- name: time-equal
- name: time-naming
- name: unchecked-type-assertion
- name: unconditional-recursion
- name: unexported-naming
- name: unexported-return
- name: unhandled-error
- name: unnecessary-format
- name: unnecessary-stmt
- name: unreachable-code
- name: unused-parameter
- name: unused-receiver
- name: use-any
- name: use-errors-new
- name: use-fmt-print
- name: useless-break
- name: var-declaration
- name: var-naming
- name: waitgroup-by-value
gocognit:
min-complexity: 15
cyclop:
max-complexity: 15
nestif:
min-complexity: 4
varnamelen:
min-name-length: 2
ignore-names: ["err", "id", "i", "j", "k", "db", "tx", "ctx", "wg"]
tagliatelle:
case:
rules:
json: snake
dupl:
threshold: 100
wrapcheck:
extra-ignore-sigs:
- .Err(
goheader:
template: |-
go-pn532
Copyright (c) {{ YEAR }} The Zaparoo Project Contributors.
SPDX-License-Identifier: LGPL-3.0-or-later
This file is part of go-pn532.
go-pn532 is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
go-pn532 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with go-pn532; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
formatters:
enable:
- gofumpt
- gci