Skip to content

Commit d531bd6

Browse files
committed
chore: refactor deprecation handling
1 parent b277ca3 commit d531bd6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/config/loader.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,12 @@ func (l *Loader) handleDeprecation() error {
322322
l.cfg.Output.Formats = f
323323
}
324324

325+
l.handleLinterOptionDeprecations()
326+
327+
return nil
328+
}
329+
330+
func (l *Loader) handleLinterOptionDeprecations() {
325331
// Deprecated since v1.57.0,
326332
// but it was unofficially deprecated since v1.19 (2019) (https://github.com/golangci/golangci-lint/pull/697).
327333
if l.cfg.LintersSettings.Govet.CheckShadowing {
@@ -369,8 +375,6 @@ func (l *Loader) handleDeprecation() error {
369375
if l.cfg.LintersSettings.Stylecheck.GoVersion != "" {
370376
l.warn("The configuration option `linters.stylecheck.go` is deprecated, please use global `run.go`.")
371377
}
372-
373-
return nil
374378
}
375379

376380
func (l *Loader) handleEnableOnlyOption() error {

0 commit comments

Comments
 (0)