Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3758,6 +3758,9 @@ linters:
# Default: []
ignore-interface-regexps:
- ^(?i)c(?-i)ach(ing|e)
# Determines whether wrapcheck should report errors returned from inside the package.
# Default: false
report-internal-errors: true

wsl:
# Do strict checking when assigning from append (x = append(x, y)).
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/golangci/golangci-lint/v2

go 1.23.0

toolchain go1.24.1

require (
4d63.com/gocheckcompilerdirectives v1.3.0
4d63.com/gochecknoglobals v0.2.2
Expand Down Expand Up @@ -111,7 +113,7 @@ require (
github.com/tetafro/godot v1.5.0
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67
github.com/timonwong/loggercheck v0.10.1
github.com/tomarrell/wrapcheck/v2 v2.10.0
github.com/tomarrell/wrapcheck/v2 v2.11.0
github.com/tommy-muehle/go-mnd/v2 v2.5.1
github.com/ultraware/funlen v0.2.0
github.com/ultraware/whitespace v0.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3934,6 +3934,11 @@
"items": {
"type": "string"
}
},
"report-internal-errors": {
"description": "determines whether wrapcheck should report errors returned from inside the package.",
"type": "boolean",
"default": false
}
}
},
Expand Down
1 change: 1 addition & 0 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ type WrapcheckSettings struct {
IgnoreSigRegexps []string `mapstructure:"ignore-sig-regexps"`
IgnorePackageGlobs []string `mapstructure:"ignore-package-globs"`
IgnoreInterfaceRegexps []string `mapstructure:"ignore-interface-regexps"`
ReportInternalErrors bool `mapstructure:"report-internal-errors"`
}

type WSLSettings struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/golinters/wrapcheck/wrapcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import (

func New(settings *config.WrapcheckSettings) *goanalysis.Linter {
cfg := wrapcheck.NewDefaultConfig()

if settings != nil {
cfg.ExtraIgnoreSigs = settings.ExtraIgnoreSigs
cfg.ReportInternalErrors = settings.ReportInternalErrors

if len(settings.IgnoreSigs) != 0 {
cfg.IgnoreSigs = settings.IgnoreSigs
Expand Down
Loading