-
-
Notifications
You must be signed in to change notification settings - Fork 623
/
.golangci.yaml
68 lines (67 loc) · 1.63 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
linters:
presets:
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
- style
- test
- unused
enable:
- forbidigo
disable:
- gci # We don't use gci.
- godox # We allow TODO lines.
- tagliatelle # As we're dealing with third parties we must accept snake case.
- wsl # We don't agree with wsl's style rules
- exhaustruct
- lll
- varnamelen
- nlreturn
- gomnd
- err113
- wrapcheck # TODO: we should probably enable this one (at least for new code).
- testpackage
- nolintlint # see https://github.com/golangci/golangci-lint/issues/3228.
- depguard # disabling temporarily
- ireturn # disabling temporarily
- perfsprint
- musttag
- tagalign # Impractical for schema-defined output parser, which relies heavily on struct tagging.
- mnd
- canonicalheader
- intrange
- testifylint
linters-settings:
cyclop:
max-complexity: 12
funlen:
lines: 90
depguard:
list-type: denylist
packages:
- github.com/samber/lo # Use exp packages or internal utilities instead.
additional-guards:
- list-type: denylist
include-go-root: false
packages:
- github.com/stretchr/testify
# Specify rules by which the linter ignores certain files for consideration.
ignore-file-rules:
- "**/*_test.go"
- "**/mock/**/*.go"
forbidigo:
forbid:
- 'import "[^"]+/(util|common|helpers)"'
gosec:
excludes:
- G115 # https://github.com/securego/gosec/issues/1212
run:
exclude-dirs:
- 'exp'