-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
120 lines (117 loc) · 3.3 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
110
111
112
113
114
115
116
117
118
119
120
---
run:
go: '1.22'
linters:
enable:
- asasalint
- asciicheck
- bodyclose
- containedctx
- contextcheck
- decorder
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
# - exportloopref
- copyloopvar
- forbidigo
- forcetypeassert
- gci
- gochecknoglobals
- gochecknoinits
- goconst
- gocritic
- goimports
# - gomnd
- gosec
- grouper
- ireturn
- loggercheck
- makezero
- misspell
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nonamedreturns
- paralleltest
- prealloc
- predeclared
- promlinter
- reassign
- revive
# - rowserrcheck # disabled because of generics
# - sqlclosecheck # disabled because of generics
- tagliatelle
- tenv
- tparallel
- unconvert
- unparam
- usestdlibvars
- varnamelen
# - wastedassign # disabled because of generics
- whitespace
- wrapcheck
# - wsl
linters-settings:
varnamelen:
# The longest distance, in source lines, that is being considered a "small scope." (defaults to 5)
# Variables used in at most this many lines will be ignored.
max-distance: 5
# The minimum length of a variable's name that is considered "long." (defaults to 3)
# Variable names that are at least this long will be ignored.
min-name-length: 2
# Check method receivers. (defaults to false)
check-receiver: false
# Check named return values. (defaults to false)
check-return: false
# Check type parameters. (defaults to false)
check-type-param: false
# Ignore "ok" variables that hold the bool return value of a type assertion. (defaults to false)
ignore-type-assert-ok: false
# Ignore "ok" variables that hold the bool return value of a map index. (defaults to false)
ignore-map-index-ok: false
# Ignore "ok" variables that hold the bool return value of a channel receive. (defaults to false)
ignore-chan-recv-ok: false
# Optional list of variable names that should be ignored completely. (defaults to empty list)
ignore-names:
- err
# Optional list of variable declarations that should be ignored completely. (defaults to empty list)
# Entries must be in one of the following forms (see below for examples):
# - for variables, parameters, named return values, method receivers, or type parameters:
# <name> <type> (<type> can also be a pointer/slice/map/chan/...)
# - for constants: const <name>
ignore-decls:
# - c echo.Context
# - t testing.T
# - f *foo.Bar
# - e error
# - i int
# - const C
# - T any
# - m map[string]int
- w http.ResponseWriter
- r *http.Request
# - q Queriable
- q fidl.Queryable
# - tx fidl.Queryable
- r chi.Router
# - tx ...fidl.Queryable
# - id int64
ireturn:
allow:
- Queryable
- error
- driver.Value
wrapcheck:
# An array of glob patterns which, if any match the package of the function
# returning the error, will skip wrapcheck analysis for this error. This is
# useful for broadly ignoring packages and/or subpackages from wrapcheck
# analysis. There are no defaults for this value.
ignorePackageGlobs:
- encoding/json*
nlreturn:
block-size: 2