-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
executable file
·90 lines (88 loc) · 2.16 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
# https://github.com/golangci/golangci-lint/issues/456#issuecomment-617470264
issues:
exclude-use-default: false
exclude:
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
# golint: False positive when tests are defined in package 'test'
- func name will be used as test\.Test.* by other packages, and that stutters; consider calling this
# gosec: Duplicated errcheck checks
- G104
# gosec: Too many issues in popular repos
- (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
# gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)'
- Potential file inclusion via variable
linters:
enable:
- asciicheck
- bodyclose
- cyclop
- durationcheck
- errorlint
- exportloopref
- forcetypeassert
- gocognit
- gocritic
- goerr113
- gofmt
- goprintffuncname
- gosec
- nakedret
- nestif
- nilerr
- noctx
- nolintlint
- prealloc
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- stylecheck
- thelper
- tparallel
- unconvert
- unparam
- varnamelen
- wastedassign
- wrapcheck
- wsl
disable:
# broken?
- errname
linters-settings:
gocognit:
min-complexity: 15
nakedret:
max-func-lines: 0
nolintlint:
allow-unused: false
allow-leading-space: false
require-explanation: true
require-specific: true
unused:
go: '1.22'
varnamelen:
check-return: true
ignore-type-assert-ok: true
ignore-map-index-ok: true
ignore-chan-recv-ok: true
ignore-decls:
- is *is.I
- t testing.T
wrapcheck:
ignoreSigs:
- .Errorf(
- errors.New(
- errors.Unwrap(
- .Wrap(
- .Wrapf(
- .WithMessage(
- .WithMessagef(
- .WithStack(
- .Err()
ignorePackageGlobs:
- github.com/blizzy78/consistent*
- golang.org/x/sync/errgroup*
- github.com/hashicorp/go-multierror*
- github.com/magefile/mage*