File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -3584,6 +3584,14 @@ linters-settings:
35843584 multi-func : true
35853585
35863586 wrapcheck :
3587+ # An array of strings specifying additional substrings of signatures to ignore.
3588+ # Unlike 'ignoreSigs', this option extends the default set (or the set specified in 'ignoreSigs') without replacing it entirely.
3589+ # This allows you to add specific signatures to the ignore list
3590+ # while retaining the defaults or any items in 'ignoreSigs'.
3591+ extra-ignore-sigs :
3592+ - .CustomError(
3593+ - .SpecificWrap(
3594+
35873595 # An array of strings that specify substrings of signatures to ignore.
35883596 # If this set, it will override the default set of ignored signatures.
35893597 # See https://github.com/tomarrell/wrapcheck#configuration for more information.
Original file line number Diff line number Diff line change 34123412 "type" : " object" ,
34133413 "additionalProperties" : false ,
34143414 "properties" : {
3415+ "extra-ignore-sigs" : {
3416+ "description" : " An array of strings specifying additional substrings of signatures to ignore." ,
3417+ "default" : [
3418+ " .CustomError(" ,
3419+ " .SpecificWrap("
3420+ ],
3421+ "type" : " array" ,
3422+ "items" : {
3423+ "type" : " string"
3424+ }
3425+ },
34153426 "ignoreSigs" : {
34163427 "description" : " An array of strings which specify substrings of signatures to ignore." ,
34173428 "default" : [
Original file line number Diff line number Diff line change @@ -982,6 +982,7 @@ type WhitespaceSettings struct {
982982}
983983
984984type WrapcheckSettings struct {
985+ ExtraIgnoreSigs []string `mapstructure:"extra-ignore-sigs"`
985986 // TODO(ldez): v2 the options must be renamed to use hyphen.
986987 IgnoreSigs []string `mapstructure:"ignoreSigs"`
987988 IgnoreSigRegexps []string `mapstructure:"ignoreSigRegexps"`
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import (
1111func New (settings * config.WrapcheckSettings ) * goanalysis.Linter {
1212 cfg := wrapcheck .NewDefaultConfig ()
1313 if settings != nil {
14+ cfg .ExtraIgnoreSigs = settings .ExtraIgnoreSigs
15+
1416 if len (settings .IgnoreSigs ) != 0 {
1517 cfg .IgnoreSigs = settings .IgnoreSigs
1618 }
You can’t perform that action at this time.
0 commit comments