Skip to content

Commit 730d671

Browse files
committed
chore: update implementation
1 parent fb518eb commit 730d671

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ module github.com/golangci/golangci-lint/v2
22

33
go 1.23.0
44

5-
toolchain go1.24.1
6-
75
require (
86
4d63.com/gocheckcompilerdirectives v1.3.0
97
4d63.com/gochecknoglobals v0.2.2

pkg/golinters/nakedret/nakedret.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ import (
99
)
1010

1111
func New(settings *config.NakedretSettings) *goanalysis.Linter {
12-
var maxLines uint
12+
cfg := &nakedret.NakedReturnRunner{}
13+
1314
if settings != nil {
14-
maxLines = settings.MaxFuncLines
15+
// SkipTestFiles is intentionally ignored => should be managed with `linters.exclusions.rules`.
16+
cfg.MaxLength = settings.MaxFuncLines
1517
}
1618

17-
a := nakedret.NakedReturnAnalyzer(maxLines, false)
19+
a := nakedret.NakedReturnAnalyzer(cfg)
1820

1921
return goanalysis.NewLinter(
2022
a.Name,

0 commit comments

Comments
 (0)