-
Notifications
You must be signed in to change notification settings - Fork 38
/
.golangci.yml
34 lines (32 loc) · 1.23 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
run:
timeout: 5m
go: '1.20'
linters:
enable:
- gofmt # Gofmt checks whether code was gofmt-ed. By default, this tool runs with -s option to check for code simplification
- gci # Gci controls golang package import order and makes it always deterministic.
- errorlint # errorlint can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
- containedctx # containedctx is a linter that detects struct contained context.Context field
- dogsled # Checks assignments with too many blank identifiers (e.g. x, , , _, := f())
- nilnil # Checks that there is no simultaneous return of nil error and an invalid value.
- noctx # noctx finds sending http request without context.Context
- gocyclo # measure cyclomatic complexity
- gocognit # measure cognitive complexity
- funlen # limit function length
- dupl # Detect code duplication
issues:
exclude-rules:
- linters:
- containedctx
- gocyclo
- gocognit
- funlen
path: _test\.go
linters-settings:
gocyclo:
min-complexity: 10
gocognit:
min-complexity: 20
funlen:
lines: 120
statements: 120