-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yaml
75 lines (72 loc) · 2.05 KB
/
.golangci.yaml
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
# Full reference: https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
run:
timeout: 5m
modules-download-mode: readonly
skip-dirs:
# I often has a poc dir for testing
- poc
linters-settings:
depguard:
rules:
tests:
deny:
- pkg: github.com/stretchr/testify/assert
desc: "Use github.com/stretchr/testify/require instead of testify/assert"
govet:
check-shadowing: true
disable:
# We set GOEXPERIMENT=loopvar and will upgrade to 1.22 when ready.
- loopclosure
misspell:
locale: US
nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
max-func-lines: 0 # completely disallow naked returns
nolintlint:
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
paralleltest:
# Ignore missing calls to `t.Parallel()` and only report incorrect uses of it.
# Default: false
ignore-missing: false
# Ignore missing calls to `t.Parallel()` in subtests. Top-level tests are
# still required to have `t.Parallel`, but subtests are allowed to skip it.
# Default: false
ignore-missing-subtests: false
linters:
disable-all: true
enable:
- asasalint
- bodyclose
- depguard
- errcheck
- errname
- errorlint
- exportloopref
- forbidigo
# - forcetypeassert
- gochecknoinits
- gocritic
# - gofumpt
- goimports
- goprintffuncname
- gosimple
- govet
- ineffassign
- ireturn
- misspell
- nakedret
- noctx
- nolintlint
- paralleltest
- reassign
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck # replacement for golint
- tenv
- unconvert
- unused
- whitespace