-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
31 lines (29 loc) · 1.07 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
linters:
disable:
- bodyclose # we use don't use pure http very often and all API clients already close the body for us
- exportloopref # this pattern is fixed in golang 1.22 https://github.com/kyoh86/exportloopref
enable:
- unused
presets:
- bugs
linters-settings:
errcheck:
exclude-functions:
# these methods are called for their side-effects, like of storing the error in the gin.Context
- "(*github.com/gin-gonic/gin.Context).Error"
- "(*github.com/gin-gonic/gin.Context).AbortWithError"
# this method sanitizes input anyways
- "(*github.com/overmindtech/sdp-go.ItemAttributes).Set"
# the only template render errors are IO errors writing to the network or
# panics.
- "(github.com/a-h/templ.Component).Render"
gosec:
excludes:
- G601 # fixed by loopvar in go 1.22; see https://github.com/securego/gosec/issues/1099
issues:
exclude-rules:
# gosec has wayyy too many false positives on test code. Most often
# complaining about rand usage
- path: _test\.go
linters:
- gosec