forked from rudderlabs/rudder-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
99 lines (93 loc) · 2.62 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
91
92
93
94
95
96
97
98
99
run:
timeout: 7m
go: '1.20'
skip-dirs:
- enterprise
- event-schema
linters:
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- bodyclose
- decorder
- makezero
- nilnil
- nilerr
- rowserrcheck
- tenv
- wastedassign
- unparam
- misspell
- unconvert
- depguard
issues:
exclude-use-default: true
exclude-case-sensitive: false
max-issues-per-linter: 50
max-same-issues: 10
new: false
exclude-rules:
# False positive httptest.NewRecorder
- path: 'gateway/webhook/webhook_test.go'
linters:
- bodyclose
# False positive .Close behind if
- path: 'processor/transformer/transformer.go'
linters:
- bodyclose
# False positive httptest.NewRecorder
- path: 'gateway/gateway_test.go'
linters:
- bodyclose
# Temporary disable until we fix the number of issues
- path: 'warehouse'
linters:
- errcheck
- unparam
linters-settings:
depguard:
# Kind of list is passed in.
# Allowed values: allowlist|denylist
# Default: denylist
list-type: denylist
# Check the list against standard lib.
# Default: false
include-go-root: true
# A list of packages for the list type specified.
# Can accept both string prefixes and string glob patterns.
# Default: []
# packages:
# - foo/hardcoded
# A list of packages for the list type specified.
# Specify an error message to output when a denied package is used.
# Default: []
# packages-with-error-message:
# - foo/hardcoded: 'use bar/hardcoded instead'
# Specify rules by which the linter ignores certain files for consideration.
# Can accept both string prefixes and string glob patterns.
# The ! character in front of the rule is a special character
# which signals that the linter should negate the rule.
# This allows for more precise control, but it is only available for glob patterns.
# Default: []
# ignore-file-rules:
# - "**/test_*.go"
# # Create additional guards that follow the same configuration pattern.
# # Results from all guards are aggregated together.
additional-guards:
- list-type: denylist
include-go-root: false
packages:
- github.com/gofrs/uuid
packages-with-error-message:
- github.com/gofrs/uuid: 'use github.com/google/uuid instead'
# Specify rules by which the linter ignores certain files for consideration.
ignore-file-rules:
- "**/uuid_test.go"