File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,9 @@ issues:
167
167
- path : pkg/golinters/errcheck/errcheck.go
168
168
linters : [staticcheck]
169
169
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"
170
173
- path : pkg/golinters/govet/govet.go
171
174
linters : [staticcheck]
172
175
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 {
371
371
DisableDefaultExclusions bool `mapstructure:"disable-default-exclusions"`
372
372
CheckTypeAssertions bool `mapstructure:"check-type-assertions"`
373
373
CheckAssignToBlank bool `mapstructure:"check-blank"`
374
- Ignore string `mapstructure:"ignore"`
375
374
ExcludeFunctions []string `mapstructure:"exclude-functions"`
376
375
377
376
// Deprecated: use ExcludeFunctions instead
378
377
Exclude string `mapstructure:"exclude"`
378
+
379
+ // Deprecated: use ExcludeFunctions instead
380
+ Ignore string `mapstructure:"ignore"`
379
381
}
380
382
381
383
type ErrChkJSONSettings struct {
Original file line number Diff line number Diff line change @@ -355,6 +355,7 @@ func (l *Loader) handleDeprecation() error {
355
355
return nil
356
356
}
357
357
358
+ //nolint:gocyclo // the complexity cannot be reduced.
358
359
func (l * Loader ) handleLinterOptionDeprecations () {
359
360
// Deprecated since v1.57.0,
360
361
// 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() {
373
374
l .log .Warnf ("The configuration option `linters.errcheck.exclude` is deprecated, please use `linters.errcheck.exclude-functions`." )
374
375
}
375
376
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
+
376
383
// Deprecated since v1.44.0.
377
384
if l .cfg .LintersSettings .Gci .LocalPrefixes != "" {
378
385
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