Skip to content

Commit d9d2368

Browse files
committedFeb 11, 2024
feat: update lint rules
1 parent 7eff3d3 commit d9d2368

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎.golangci.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ run:
44
timeout: 3m
55
skip-dirs:
66
- testdata
7-
build-tags:
8-
- codeanalysis
7+
skip-files:
8+
- docs.go
99

1010

1111
# This file contains only configs which differ from defaults.
@@ -46,7 +46,7 @@ linters-settings:
4646
gocognit:
4747
# Minimal code complexity to report
4848
# Default: 30 (but we recommend 10-20)
49-
min-complexity: 40
49+
min-complexity: 30
5050

5151
gocritic:
5252
# Settings passed to gocritic.
@@ -211,6 +211,7 @@ linters:
211211
- stylecheck # is a replacement for golint
212212
- tenv # detects using os.Setenv instead of t.Setenv since Go1.17
213213
- testableexamples # checks if examples are testable (have an expected output)
214+
#- testpackage # makes you use a separate _test package
214215
- tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes
215216
- unconvert # removes unnecessary type conversions
216217
- unparam # reports unused function parameters
@@ -279,9 +280,6 @@ issues:
279280
linters: [ gocritic ]
280281
- source: "^\\s+if _, ok := err\\.\\([^.]+\\.InternalError\\); ok {"
281282
linters: [ errorlint ]
282-
- path: "docs\\.go"
283-
linters:
284-
- lll
285283
- path: "_test\\.go"
286284
linters:
287285
- bodyclose

‎scaler_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ func FuzzScaler(f *testing.F) {
489489
})
490490
}
491491

492+
//nolint:gocognit // This is a test function
492493
func Test_Scaler_Max(t *testing.T) {
493494
tests := map[string]struct {
494495
max uint

‎stream_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ func Test_FanOut_Canceled_On_Wait(_ *testing.T) {
338338
FanOut(ctx, in, out)
339339
}
340340

341+
//nolint:gocognit // This is a test function
341342
func DistributeTest[U ~[]T, T comparable](
342343
t *testing.T,
343344
name string,

0 commit comments

Comments
 (0)
Please sign in to comment.