@@ -95,6 +95,8 @@ func (l *Loader) Load(opts LoadOptions) error {
95
95
if err != nil {
96
96
return err
97
97
}
98
+
99
+ l .handleFormatterDeprecations ()
98
100
}
99
101
100
102
l .handleGoVersion ()
@@ -429,9 +431,6 @@ func (l *Loader) handleLinterOptionDeprecations() {
429
431
if l .cfg .LintersSettings .Gci .LocalPrefixes != "" {
430
432
l .log .Warnf ("The configuration option `linters.gci.local-prefixes` is deprecated, please use `prefix()` inside `linters.gci.sections`." )
431
433
}
432
- if l .cfg .Formatters .Settings .Gci .LocalPrefixes != "" {
433
- l .log .Warnf ("The configuration option `formatters.settings.gci.local-prefixes` is deprecated, please use `prefix()` inside `formatters.settings.gci.sections`." )
434
- }
435
434
436
435
// Deprecated since v1.33.0.
437
436
if l .cfg .LintersSettings .Godot .CheckAll != nil {
@@ -442,9 +441,6 @@ func (l *Loader) handleLinterOptionDeprecations() {
442
441
if l .cfg .LintersSettings .GoFumpt .LangVersion != "" {
443
442
l .log .Warnf ("The configuration option `linters.gofumpt.lang-version` is deprecated, please use global `run.go`." )
444
443
}
445
- if l .cfg .Formatters .Settings .GoFumpt .LangVersion != "" {
446
- l .log .Warnf ("The configuration option `formatters.settings.gofumpt.lang-version` is deprecated, please use global `run.go`." )
447
- }
448
444
449
445
// Deprecated since v1.47.0
450
446
if l .cfg .LintersSettings .Staticcheck .GoVersion != "" {
@@ -543,6 +539,19 @@ func (l *Loader) handleFormatterExclusions() {
543
539
})
544
540
}
545
541
}
542
+ func (l * Loader ) handleFormatterDeprecations () {
543
+ // Deprecated since v1.44.0.
544
+ if l .cfg .Formatters .Settings .Gci .LocalPrefixes != "" {
545
+ l .log .Warnf ("The configuration option `formatters.settings.gci.local-prefixes` is deprecated, " +
546
+ "please use `prefix()` inside `formatters.settings.gci.sections`." )
547
+ }
548
+
549
+ // Deprecated since v1.47.0
550
+ if l .cfg .Formatters .Settings .GoFumpt .LangVersion != "" {
551
+ l .log .Warnf ("The configuration option `formatters.settings.gofumpt.lang-version` is deprecated, " +
552
+ "please use global `run.go`." )
553
+ }
554
+ }
546
555
547
556
func customDecoderHook () viper.DecoderConfigOption {
548
557
return viper .DecodeHook (mapstructure .ComposeDecodeHookFunc (
0 commit comments