You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reason: "see https://developers.google.com/protocol-buffers/docs/reference/go/faq#modules"
123
+
- github.com/satori/go.uuid:
124
+
recommendations:
125
+
- github.com/google/uuid
126
+
reason: "satori's package is not maintained"
127
+
- github.com/gofrs/uuid:
128
+
recommendations:
129
+
- github.com/google/uuid
130
+
reason: "gofrs' package is not go module"
131
+
132
+
govet:
133
+
# Enable all analyzers.
134
+
# Default: false
135
+
enable-all: true
136
+
# Disable analyzers by name.
137
+
# Run `go tool vet help` to see all analyzers.
138
+
# Default: []
139
+
disable:
140
+
- fieldalignment # too strict
141
+
# Settings per analyzer.
142
+
settings:
143
+
shadow:
144
+
# Whether to be strict about shadowing; can be noisy.
145
+
# Default: false
146
+
strict: true
147
+
148
+
nakedret:
149
+
# Make an issue if func has more lines of code than this setting, and it has naked returns.
150
+
# Default: 30
151
+
max-func-lines: 0
152
+
153
+
nolintlint:
154
+
# Exclude following linters from requiring an explanation.
155
+
# Default: []
156
+
allow-no-explanation: [ funlen, gocognit, lll ]
157
+
# Enable to require an explanation of nonzero length after each nolint directive.
158
+
# Default: false
159
+
require-explanation: true
160
+
# Enable to require nolint directives to mention the specific linter being suppressed.
161
+
# Default: false
162
+
require-specific: true
163
+
164
+
rowserrcheck:
165
+
# database/sql is always checked
166
+
# Default: []
167
+
packages:
168
+
- github.com/jmoiron/sqlx
169
+
170
+
tenv:
171
+
# The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures.
172
+
# Otherwise, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked.
173
+
# Default: false
174
+
all: true
175
+
176
+
177
+
linters:
178
+
disable-all: true
179
+
enable:
180
+
## enabled by default
181
+
- errcheck # checking for unchecked errors, these unchecked errors can be critical bugs in some cases
182
+
- gosimple # specializes in simplifying a code
183
+
- govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
184
+
- ineffassign # detects when assignments to existing variables are not used
185
+
- staticcheck # is a go vet on steroids, applying a ton of static analysis checks
186
+
- typecheck # like the front-end of a Go compiler, parses and type-checks Go code
187
+
- unused # checks for unused constants, variables, functions and types
188
+
## disabled by default
189
+
- asasalint # checks for pass []any as any in variadic func(...any)
190
+
- asciicheck # checks that your code does not contain non-ASCII identifiers
191
+
- bidichk # checks for dangerous unicode character sequences
192
+
- bodyclose # checks whether HTTP response body is closed successfully
193
+
- cyclop # checks function and package cyclomatic complexity
194
+
- dupl # tool for code clone detection
195
+
- durationcheck # checks for two durations multiplied together
196
+
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
197
+
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
198
+
- execinquery # checks query string in Query function which reads your Go src files and warning it finds
199
+
- exhaustive # checks exhaustiveness of enum switch statements
200
+
- exportloopref # checks for pointers to enclosing loop variables
201
+
- forbidigo # forbids identifiers
202
+
- funlen # tool for detection of long functions
203
+
- gocheckcompilerdirectives # validates go compiler directive comments (//go:)
204
+
- gochecknoglobals # checks that no global variables exist
205
+
- gochecknoinits # checks that no init functions are present in Go code
206
+
- gochecksumtype # checks exhaustiveness on Go "sum types"
207
+
- gocognit # computes and checks the cognitive complexity of functions
208
+
- goconst # finds repeated strings that could be replaced by a constant
209
+
- gocritic # provides diagnostics that check for bugs, performance and style issues
210
+
- gocyclo # computes and checks the cyclomatic complexity of functions
211
+
- godot # checks if comments end in a period
212
+
- goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt
213
+
- gomnd # detects magic numbers
214
+
- gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod
215
+
- gomodguard # allow and block lists linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations
216
+
- goprintffuncname # checks that printf-like functions are named with f at the end
217
+
- gosec # inspects source code for security problems
218
+
- lll # reports long lines
219
+
- loggercheck # checks key value pairs for common logger libraries (kitlog,klog,logr,zap)
220
+
- makezero # finds slice declarations with non-zero initial length
221
+
- mirror # reports wrong mirror patterns of bytes/strings usage
222
+
- musttag # enforces field tags in (un)marshaled structs
223
+
- nakedret # finds naked returns in functions greater than a specified function length
224
+
- nestif # reports deeply nested if statements
225
+
- nilerr # finds the code that returns nil even if it checks that the error is not nil
226
+
- nilnil # checks that there is no simultaneous return of nil error and an invalid value
227
+
- noctx # finds sending http request without context.Context
228
+
- nolintlint # reports ill-formed or insufficient nolint directives
229
+
- nonamedreturns # reports all named returns
230
+
- nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL
231
+
- perfsprint # checks that fmt.Sprintf can be replaced with a faster alternative
232
+
- predeclared # finds code that shadows one of Go's predeclared identifiers
233
+
- promlinter # checks Prometheus metrics naming via promlint
234
+
- protogetter # reports direct reads from proto message fields when getters should be used
235
+
- reassign # checks that package variables are not reassigned
236
+
- revive # fast, configurable, extensible, flexible, and beautiful linter for Go, drop-in replacement of golint
237
+
- rowserrcheck # checks whether Err of rows is checked successfully
238
+
- sloglint # ensure consistent code style when using log/slog
239
+
- sqlclosecheck # checks that sql.Rows and sql.Stmt are closed
240
+
- stylecheck # is a replacement for golint
241
+
- tenv # detects using os.Setenv instead of t.Setenv since Go1.17
242
+
- testableexamples # checks if examples are testable (have an expected output)
243
+
- testifylint # checks usage of github.com/stretchr/testify
244
+
- testpackage # makes you use a separate _test package
245
+
- tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes
246
+
- unconvert # removes unnecessary type conversions
247
+
- unparam # reports unused function parameters
248
+
- usestdlibvars # detects the possibility to use variables/constants from the Go standard library
0 commit comments