Skip to content

Commit 41a1013

Browse files
committed
chore: isolate deprecated settings
1 parent b0bc669 commit 41a1013

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

pkg/config/linters_settings.go

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,12 @@ type FunlenSettings struct {
452452
}
453453

454454
type GciSettings struct {
455-
LocalPrefixes string `mapstructure:"local-prefixes"` // Deprecated
456455
Sections []string `mapstructure:"sections"`
457456
SkipGenerated bool `mapstructure:"skip-generated"`
458457
CustomOrder bool `mapstructure:"custom-order"`
458+
459+
// Deprecated: use Sections instead.
460+
LocalPrefixes string `mapstructure:"local-prefixes"`
459461
}
460462

461463
type GinkgoLinterSettings struct {
@@ -511,7 +513,7 @@ type GodotSettings struct {
511513
Capital bool `mapstructure:"capital"`
512514
Period bool `mapstructure:"period"`
513515

514-
// Deprecated: use `Scope` instead
516+
// Deprecated: use Scope instead
515517
CheckAll bool `mapstructure:"check-all"`
516518
}
517519

@@ -548,11 +550,13 @@ type GoImportsSettings struct {
548550
}
549551

550552
type GoMndSettings struct {
551-
Settings map[string]map[string]any // Deprecated
552-
Checks []string `mapstructure:"checks"`
553-
IgnoredNumbers []string `mapstructure:"ignored-numbers"`
554-
IgnoredFiles []string `mapstructure:"ignored-files"`
555-
IgnoredFunctions []string `mapstructure:"ignored-functions"`
553+
Checks []string `mapstructure:"checks"`
554+
IgnoredNumbers []string `mapstructure:"ignored-numbers"`
555+
IgnoredFiles []string `mapstructure:"ignored-files"`
556+
IgnoredFunctions []string `mapstructure:"ignored-functions"`
557+
558+
// Deprecated: use root level settings instead.
559+
Settings map[string]map[string]any
556560
}
557561

558562
type GoModDirectivesSettings struct {
@@ -814,13 +818,13 @@ type SpancheckSettings struct {
814818
}
815819

816820
type StaticCheckSettings struct {
817-
// Deprecated: use the global `run.go` instead.
818-
GoVersion string `mapstructure:"go"`
819-
820821
Checks []string `mapstructure:"checks"`
821822
Initialisms []string `mapstructure:"initialisms"` // only for stylecheck
822823
DotImportWhitelist []string `mapstructure:"dot-import-whitelist"` // only for stylecheck
823824
HTTPStatusCodeWhitelist []string `mapstructure:"http-status-code-whitelist"` // only for stylecheck
825+
826+
// Deprecated: use the global `run.go` instead.
827+
GoVersion string `mapstructure:"go"`
824828
}
825829

826830
func (s *StaticCheckSettings) HasConfiguration() bool {

pkg/config/run.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ type Run struct {
2121
ExitCodeIfIssuesFound int `mapstructure:"issues-exit-code"`
2222
AnalyzeTests bool `mapstructure:"tests"`
2323

24+
AllowParallelRunners bool `mapstructure:"allow-parallel-runners"`
25+
AllowSerialRunners bool `mapstructure:"allow-serial-runners"`
26+
2427
// Deprecated: use Issues.ExcludeFiles instead.
2528
SkipFiles []string `mapstructure:"skip-files"`
2629
// Deprecated: use Issues.ExcludeDirs instead.
2730
SkipDirs []string `mapstructure:"skip-dirs"`
2831
// Deprecated: use Issues.UseDefaultExcludeDirs instead.
2932
UseDefaultSkipDirs bool `mapstructure:"skip-dirs-use-default"`
3033

31-
AllowParallelRunners bool `mapstructure:"allow-parallel-runners"`
32-
AllowSerialRunners bool `mapstructure:"allow-serial-runners"`
33-
3434
// Deprecated: use Output.ShowStats instead.
3535
ShowStats bool `mapstructure:"show-stats"`
3636
}

0 commit comments

Comments
 (0)