-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yml
141 lines (124 loc) · 2.69 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
linters-settings:
funlen:
lines: 100
statements: 50
cyclop:
skip-tests: true
max-complexity: 30
package-average: 5
gocyclo:
min-complexity: 15
goconst:
min-len: 2
min-occurrences: 3
gocritic:
enable-all: true
godot:
capital: true
gosimple:
checks: ["all"]
govet:
enable:
- assign
- atomic
- atomicalign
- bools
- buildtag
- cgocall
- composites
- copylocks
- deepequalerrors
- errorsas
- fieldalignment
- findcall
- framepointer
- httpresponse
- ifaceassert
- loopclosure
- lostcancel
- nilfunc
- printf
- reflectvaluecompare
- shift
- sigchanyzer
- sortslice
- stdmethods
- stringintconv
- structtag
- testinggoroutine
- tests
- unmarshal
- unreachable
- unsafeptr
- unusedresult
misspell:
locale: UK
staticcheck:
checks: ["all"]
stylecheck:
checks: ["all"]
unparam:
check-exported: true
varnamelen:
ignore-decls:
- t testing.T
- tx pgx.Tx
- fn func(pgx.Tx) error
paralleltest:
ignore-missing-subtests: true
wrapcheck:
ignoreSigs:
- errors.Join
- retry/v3.Retry).Do
- retry/v3.Retry).DoContext
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- path: _test\.go
linters:
- dupl # we usualy duplicate code in tests
- errcheck
- forcetypeassert
- gocritic # we don't care for most of these lint errors in tests
- gosec # security check is not important in tests
- govet
- ireturn
- nlreturn # is ok in tests.
- unparam
- varnamelen # is ok in tests.
- wrapcheck
- path: dbtesting/dbtesting\.go
linters:
- gochecknoglobals
- ireturn
- nlreturn # is ok in tests.
- varnamelen
- path: dbtesting/mocha\.go
linters:
- errcheck
- ireturn
- varnamelen
fix: true
exclude-use-default: false
exclude-dirs:
- tmp
- bin
- scripts
run:
timeout: 5m
allow-parallel-runners: true
tests: true
build-tags:
- integration
linters:
enable-all: true
disable:
- contextcheck # There is one instance and it requires a fresh context.
- depguard # because I don't want to write a dedicated config file.
- err113 # There i
- exhaustruct # I want to use zero values.
- gochecknoinits
- gomnd # is been replaced by mnd.
- interfacebloat # We need to define the Tx interface.
- mnd # I'm not into it.
- wsl # Too restrictive for this project.