-
Notifications
You must be signed in to change notification settings - Fork 13
/
.golangci.yml
159 lines (142 loc) · 3.13 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
run:
timeout: 5m
build-tags:
- e2e
linters:
enable-all: true
disable:
- bodyclose
- contextcheck
- cyclop
- depguard
- execinquery
- exhaustive
- exhaustruct
- exportloopref
- funlen
- gochecknoglobals
- gochecknoinits
- goconst
- godox
- err113
- gomnd
- gomoddirectives
- inamedparam
- ireturn
- mnd
- nlreturn
- nonamedreturns
- tagliatelle
- varnamelen
- wrapcheck
- wsl
fast: false
linters-settings:
errcheck:
check-blank: true
gocognit:
min-complexity: 50
gocyclo:
min-complexity: 40
gocritic:
enabled-tags:
- diagnostic
- performance
- style
lll:
line-length: 180
nestif:
min-complexity: 11
goheader:
values:
regexp:
year: "2024"
template-path: .go-header-template.yml
revive:
rules:
- name: unused-parameter
disabled: true
issues:
exclude:
- "Error return value of `cmd.MarkFlag.+` is not checked"
- "Error return value of `net.SplitHostPort` is not checked"
- "Error return value of `w.Write` is not checked"
- "Limiter.WaitN` is not checked"
- "Temporary has been deprecated since Go 1.18 because it shouldn't be used"
- "`nop.+` is unused"
- "can be `expvar.Var`"
- "can be `fmt.Stringer`"
- "missing cases in switch of type Scheme: TunnelScheme"
- "shadow of imported from 'github.com/saucelabs/forwarder/log' package 'log'"
- "string `https?` has \\d+ occurrences"
- "importShadow: shadow of imported package 'url'"
- "commentedOutCode: may want to remove commented-out code"
- "grpc.Dial is deprecated: use NewClient instead"
exclude-files:
- middleware/delegator.go
- utils/cobrautil/templates
- utils/cobrautil/term
- sizesuffix
exclude-rules:
- path: _test\.go
linters:
- bodyclose
- errcheck
- funlen
- gocognit
- gomnd
- gosec
- noctx
- paralleltest
- testpackage
- path: e2e/
linters:
- prealloc
- nakedret
- nosprintfhostport
- path: e2e/run.go
linters:
- forbidigo
text: use of `fmt.Print
- path: internal/martian
linters:
- goheader
- errcheck
- gosec
- path: internal/martian/context.go
linters:
- forcetypeassert
- path: internal/martian/h2/testing
linters:
- forbidigo
text: use of `fmt.Print
- linters:
- thelper
source: "configure: func\\(t \\*testing.T"
- linters:
- gocognit
- gocyclo
- maintidx
source: "func \\(c \\*command\\) runE\\(cmd \\*cobra\\.Command"
- linters:
- gocritic
source: "// output:"
- linters:
- golint
source: 'import _ "embed"'
- linters:
- forcetypeassert
source: "http.DefaultTransport"
- linters:
- lll
source: "//nolint:"
- linters:
- lll
source: "json:"
- linters:
- nosnakecase
source: "func Example"
- path: utils/dnshack/
linters:
- goheader