Skip to content

Commit d864d1e

Browse files
committed
chore: rename wrapcheck options
1 parent e4afea6 commit d864d1e

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

.golangci.next.reference.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -3878,9 +3878,9 @@ linters-settings:
38783878

38793879
wrapcheck:
38803880
# An array of strings specifying additional substrings of signatures to ignore.
3881-
# Unlike 'ignoreSigs', this option extends the default set (or the set specified in 'ignoreSigs') without replacing it entirely.
3881+
# Unlike 'ignore-sigs', this option extends the default set (or the set specified in 'ignore-sigs') without replacing it entirely.
38823882
# This allows you to add specific signatures to the ignore list
3883-
# while retaining the defaults or any items in 'ignoreSigs'.
3883+
# while retaining the defaults or any items in 'ignore-sigs'.
38843884
# Default: []
38853885
extra-ignore-sigs:
38863886
- .CustomError(
@@ -3890,7 +3890,7 @@ linters-settings:
38903890
# If this set, it will override the default set of ignored signatures.
38913891
# See https://github.com/tomarrell/wrapcheck#configuration for more information.
38923892
# Default: [".Errorf(", "errors.New(", "errors.Unwrap(", "errors.Join(", ".Wrap(", ".Wrapf(", ".WithMessage(", ".WithMessagef(", ".WithStack("]
3893-
ignoreSigs:
3893+
ignore-sigs:
38943894
- .Errorf(
38953895
- errors.New(
38963896
- errors.Unwrap(
@@ -3902,16 +3902,16 @@ linters-settings:
39023902
- .WithStack(
39033903
# An array of strings that specify regular expressions of signatures to ignore.
39043904
# Default: []
3905-
ignoreSigRegexps:
3905+
ignore-sig-regexps:
39063906
- \.New.*Error\(
39073907
# An array of strings that specify globs of packages to ignore.
39083908
# Default: []
3909-
ignorePackageGlobs:
3909+
ignore-package-globs:
39103910
- encoding/*
39113911
- github.com/pkg/*
39123912
# An array of strings that specify regular expressions of interfaces to ignore.
39133913
# Default: []
3914-
ignoreInterfaceRegexps:
3914+
ignore-interface-regexps:
39153915
- ^(?i)c(?-i)ach(ing|e)
39163916

39173917
wsl:

jsonschema/golangci.next.jsonschema.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -3586,7 +3586,7 @@
35863586
"type": "string"
35873587
}
35883588
},
3589-
"ignoreSigs": {
3589+
"ignore-sigs": {
35903590
"description": "An array of strings which specify substrings of signatures to ignore.",
35913591
"default": [
35923592
".Errorf(",
@@ -3603,23 +3603,23 @@
36033603
"type": "string"
36043604
}
36053605
},
3606-
"ignoreSigRegexps": {
3606+
"ignore-sig-regexps": {
36073607
"description": "An array of strings which specify regular expressions of signatures to ignore.",
36083608
"default": [""],
36093609
"type": "array",
36103610
"items": {
36113611
"type": "string"
36123612
}
36133613
},
3614-
"ignorePackageGlobs": {
3614+
"ignore-package-globs": {
36153615
"description": "An array of glob patterns which, if any match the package of the function returning the error, will skip wrapcheck analysis for this error.",
36163616
"default": [""],
36173617
"type": "array",
36183618
"items": {
36193619
"type": "string"
36203620
}
36213621
},
3622-
"ignoreInterfaceRegexps": {
3622+
"ignore-interface-regexps": {
36233623
"description": "An array of glob patterns which, if matched to an underlying interface name, will ignore unwrapped errors returned from a function whose call is defined on the given interface.",
36243624
"default": [""],
36253625
"type": "array",

pkg/config/linters_settings.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -987,12 +987,11 @@ type WhitespaceSettings struct {
987987
}
988988

989989
type WrapcheckSettings struct {
990-
ExtraIgnoreSigs []string `mapstructure:"extra-ignore-sigs"`
991-
// TODO(ldez): v2 the options must be renamed to use hyphen.
992-
IgnoreSigs []string `mapstructure:"ignoreSigs"`
993-
IgnoreSigRegexps []string `mapstructure:"ignoreSigRegexps"`
994-
IgnorePackageGlobs []string `mapstructure:"ignorePackageGlobs"`
995-
IgnoreInterfaceRegexps []string `mapstructure:"ignoreInterfaceRegexps"`
990+
ExtraIgnoreSigs []string `mapstructure:"extra-ignore-sigs"`
991+
IgnoreSigs []string `mapstructure:"ignore-sigs"`
992+
IgnoreSigRegexps []string `mapstructure:"ignore-sig-regexps"`
993+
IgnorePackageGlobs []string `mapstructure:"ignore-package-globs"`
994+
IgnoreInterfaceRegexps []string `mapstructure:"ignore-interface-regexps"`
996995
}
997996

998997
type WSLSettings struct {

0 commit comments

Comments
 (0)