Skip to content

Commit

Permalink
feat: update lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
benjivesterby committed Feb 11, 2024
1 parent 7eff3d3 commit d9d2368
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ run:
timeout: 3m
skip-dirs:
- testdata
build-tags:
- codeanalysis
skip-files:
- docs.go


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

gocritic:
# Settings passed to gocritic.
Expand Down Expand Up @@ -211,6 +211,7 @@ linters:
- stylecheck # is a replacement for golint
- tenv # detects using os.Setenv instead of t.Setenv since Go1.17
- testableexamples # checks if examples are testable (have an expected output)
#- testpackage # makes you use a separate _test package
- tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes
- unconvert # removes unnecessary type conversions
- unparam # reports unused function parameters
Expand Down Expand Up @@ -279,9 +280,6 @@ issues:
linters: [ gocritic ]
- source: "^\\s+if _, ok := err\\.\\([^.]+\\.InternalError\\); ok {"
linters: [ errorlint ]
- path: "docs\\.go"
linters:
- lll
- path: "_test\\.go"
linters:
- bodyclose
Expand Down
1 change: 1 addition & 0 deletions scaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ func FuzzScaler(f *testing.F) {
})
}

//nolint:gocognit // This is a test function
func Test_Scaler_Max(t *testing.T) {
tests := map[string]struct {
max uint
Expand Down
1 change: 1 addition & 0 deletions stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ func Test_FanOut_Canceled_On_Wait(_ *testing.T) {
FanOut(ctx, in, out)
}

//nolint:gocognit // This is a test function
func DistributeTest[U ~[]T, T comparable](
t *testing.T,
name string,
Expand Down

0 comments on commit d9d2368

Please sign in to comment.