File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,9 @@ issues:
167167 - path : pkg/golinters/errcheck/errcheck.go
168168 linters : [staticcheck]
169169 text : " SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead"
170+ - path : pkg/golinters/errcheck/errcheck.go
171+ linters : [staticcheck]
172+ text : " SA1019: errCfg.Ignore is deprecated: use ExcludeFunctions instead"
170173 - path : pkg/golinters/govet/govet.go
171174 linters : [staticcheck]
172175 text : " SA1019: cfg.CheckShadowing is deprecated: the linter should be enabled inside Enable."
Original file line number Diff line number Diff line change @@ -371,11 +371,13 @@ type ErrcheckSettings struct {
371371 DisableDefaultExclusions bool `mapstructure:"disable-default-exclusions"`
372372 CheckTypeAssertions bool `mapstructure:"check-type-assertions"`
373373 CheckAssignToBlank bool `mapstructure:"check-blank"`
374- Ignore string `mapstructure:"ignore"`
375374 ExcludeFunctions []string `mapstructure:"exclude-functions"`
376375
377376 // Deprecated: use ExcludeFunctions instead
378377 Exclude string `mapstructure:"exclude"`
378+
379+ // Deprecated: use ExcludeFunctions instead
380+ Ignore string `mapstructure:"ignore"`
379381}
380382
381383type ErrChkJSONSettings struct {
Original file line number Diff line number Diff line change @@ -355,6 +355,7 @@ func (l *Loader) handleDeprecation() error {
355355 return nil
356356}
357357
358+ //nolint:gocyclo // the complexity cannot be reduced.
358359func (l * Loader ) handleLinterOptionDeprecations () {
359360 // Deprecated since v1.57.0,
360361 // but it was unofficially deprecated since v1.19 (2019) (https://github.com/golangci/golangci-lint/pull/697).
@@ -373,6 +374,12 @@ func (l *Loader) handleLinterOptionDeprecations() {
373374 l .log .Warnf ("The configuration option `linters.errcheck.exclude` is deprecated, please use `linters.errcheck.exclude-functions`." )
374375 }
375376
377+ // Deprecated since v1.59.0,
378+ // but it was unofficially deprecated since v1.13 (2018) (https://github.com/golangci/golangci-lint/pull/332).
379+ if l .cfg .LintersSettings .Errcheck .Ignore != "" {
380+ l .log .Warnf ("The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`." )
381+ }
382+
376383 // Deprecated since v1.44.0.
377384 if l .cfg .LintersSettings .Gci .LocalPrefixes != "" {
378385 l .log .Warnf ("The configuration option `linters.gci.local-prefixes` is deprecated, please use `prefix()` inside `linters.gci.sections`." )
You can’t perform that action at this time.
0 commit comments