@@ -200,7 +200,7 @@ type LintersSettings struct {
200200 Asasalint AsasalintSettings `mapstructure:"asasalint"`
201201 BiDiChk BiDiChkSettings `mapstructure:"bidichk"`
202202 CopyLoopVar CopyLoopVarSettings `mapstructure:"copyloopvar"`
203- Cyclop Cyclop `mapstructure:"cyclop"`
203+ Cyclop CyclopSettings `mapstructure:"cyclop"`
204204 Decorder DecorderSettings `mapstructure:"decorder"`
205205 Depguard DepGuardSettings `mapstructure:"depguard"`
206206 Dogsled DogsledSettings `mapstructure:"dogsled"`
@@ -314,7 +314,7 @@ type CopyLoopVarSettings struct {
314314 CheckAlias bool `mapstructure:"check-alias"`
315315}
316316
317- type Cyclop struct {
317+ type CyclopSettings struct {
318318 MaxComplexity int `mapstructure:"max-complexity"`
319319 PackageAverage float64 `mapstructure:"package-average"`
320320}
@@ -505,21 +505,29 @@ type GoModDirectivesSettings struct {
505505}
506506
507507type GoModGuardSettings struct {
508- Allowed struct {
509- Modules []string `mapstructure:"modules"`
510- Domains []string `mapstructure:"domains"`
511- } `mapstructure:"allowed"`
512- Blocked struct {
513- Modules []map [string ]struct {
514- Recommendations []string `mapstructure:"recommendations"`
515- Reason string `mapstructure:"reason"`
516- } `mapstructure:"modules"`
517- Versions []map [string ]struct {
518- Version string `mapstructure:"version"`
519- Reason string `mapstructure:"reason"`
520- } `mapstructure:"versions"`
521- LocalReplaceDirectives bool `mapstructure:"local-replace-directives"`
522- } `mapstructure:"blocked"`
508+ Allowed GoModGuardAllowed `mapstructure:"allowed"`
509+ Blocked GoModGuardBlocked `mapstructure:"blocked"`
510+ }
511+
512+ type GoModGuardAllowed struct {
513+ Modules []string `mapstructure:"modules"`
514+ Domains []string `mapstructure:"domains"`
515+ }
516+
517+ type GoModGuardBlocked struct {
518+ Modules []map [string ]GoModGuardModule `mapstructure:"modules"`
519+ Versions []map [string ]GoModGuardVersion `mapstructure:"versions"`
520+ LocalReplaceDirectives bool `mapstructure:"local-replace-directives"`
521+ }
522+
523+ type GoModGuardModule struct {
524+ Recommendations []string `mapstructure:"recommendations"`
525+ Reason string `mapstructure:"reason"`
526+ }
527+
528+ type GoModGuardVersion struct {
529+ Version string `mapstructure:"version"`
530+ Reason string `mapstructure:"reason"`
523531}
524532
525533type GoSecSettings struct {
@@ -545,7 +553,7 @@ type GovetSettings struct {
545553 EnableAll bool `mapstructure:"enable-all"`
546554 DisableAll bool `mapstructure:"disable-all"`
547555
548- Settings map [string ]map [string ]any
556+ Settings map [string ]map [string ]any `mapstructure:"settings"`
549557}
550558
551559func (cfg * GovetSettings ) Validate () error {
@@ -638,11 +646,13 @@ type MisspellExtraWords struct {
638646}
639647
640648type MustTagSettings struct {
641- Functions []struct {
642- Name string `mapstructure:"name"`
643- Tag string `mapstructure:"tag"`
644- ArgPos int `mapstructure:"arg-pos"`
645- } `mapstructure:"functions"`
649+ Functions []MustTagFunction `mapstructure:"functions"`
650+ }
651+
652+ type MustTagFunction struct {
653+ Name string `mapstructure:"name"`
654+ Tag string `mapstructure:"tag"`
655+ ArgPos int `mapstructure:"arg-pos"`
646656}
647657
648658type NakedretSettings struct {
@@ -703,7 +713,7 @@ type PerfSprintSettings struct {
703713}
704714
705715type PreallocSettings struct {
706- Simple bool
716+ Simple bool `mapstructure:"simple"`
707717 RangeLoops bool `mapstructure:"range-loops"`
708718 ForLoops bool `mapstructure:"for-loops"`
709719}
@@ -735,24 +745,28 @@ type RecvcheckSettings struct {
735745}
736746
737747type ReviveSettings struct {
738- Go string `mapstructure:"-"`
739- MaxOpenFiles int `mapstructure:"max-open-files"`
740- Confidence float64 `mapstructure:"confidence"`
741- Severity string `mapstructure:"severity"`
742- EnableAllRules bool `mapstructure:"enable-all-rules"`
743- Rules []struct {
744- Name string `mapstructure:"name"`
745- Arguments []any `mapstructure:"arguments"`
746- Severity string `mapstructure:"severity"`
747- Disabled bool `mapstructure:"disabled"`
748- Exclude []string `mapstructure:"exclude"`
749- } `mapstructure:"rules"`
750- ErrorCode int `mapstructure:"error-code"`
751- WarningCode int `mapstructure:"warning-code"`
752- Directives []struct {
753- Name string `mapstructure:"name"`
754- Severity string `mapstructure:"severity"`
755- } `mapstructure:"directives"`
748+ Go string `mapstructure:"-"`
749+ MaxOpenFiles int `mapstructure:"max-open-files"`
750+ Confidence float64 `mapstructure:"confidence"`
751+ Severity string `mapstructure:"severity"`
752+ EnableAllRules bool `mapstructure:"enable-all-rules"`
753+ Rules []ReviveRule `mapstructure:"rules"`
754+ ErrorCode int `mapstructure:"error-code"`
755+ WarningCode int `mapstructure:"warning-code"`
756+ Directives []ReviveDirective `mapstructure:"directives"`
757+ }
758+
759+ type ReviveRule struct {
760+ Name string `mapstructure:"name"`
761+ Arguments []any `mapstructure:"arguments"`
762+ Severity string `mapstructure:"severity"`
763+ Disabled bool `mapstructure:"disabled"`
764+ Exclude []string `mapstructure:"exclude"`
765+ }
766+
767+ type ReviveDirective struct {
768+ Name string `mapstructure:"name"`
769+ Severity string `mapstructure:"severity"`
756770}
757771
758772type RowsErrCheckSettings struct {
@@ -830,30 +844,37 @@ type TestifylintSettings struct {
830844 EnabledCheckers []string `mapstructure:"enable"`
831845 DisabledCheckers []string `mapstructure:"disable"`
832846
833- BoolCompare struct {
834- IgnoreCustomTypes bool `mapstructure:"ignore-custom-types"`
835- } `mapstructure:"bool-compare"`
847+ BoolCompare TestifylintBoolCompare `mapstructure:"bool-compare"`
848+ ExpectedActual TestifylintExpectedActual `mapstructure:"expected-actual"`
849+ Formatter TestifylintFormatter `mapstructure:"formatter"`
850+ GoRequire TestifylintGoRequire `mapstructure:"go-require"`
851+ RequireError TestifylintRequireError `mapstructure:"require-error"`
852+ SuiteExtraAssertCall TestifylintSuiteExtraAssertCall `mapstructure:"suite-extra-assert-call"`
853+ }
836854
837- ExpectedActual struct {
838- ExpVarPattern string `mapstructure:"pattern "`
839- } `mapstructure:"expected-actual"`
855+ type TestifylintBoolCompare struct {
856+ IgnoreCustomTypes bool `mapstructure:"ignore-custom-types "`
857+ }
840858
841- Formatter struct {
842- CheckFormatString * bool `mapstructure:"check-format-string"`
843- RequireFFuncs bool `mapstructure:"require-f-funcs"`
844- } `mapstructure:"formatter"`
859+ type TestifylintExpectedActual struct {
860+ ExpVarPattern string `mapstructure:"pattern"`
861+ }
845862
846- GoRequire struct {
847- IgnoreHTTPHandlers bool `mapstructure:"ignore-http-handlers"`
848- } `mapstructure:"go-require"`
863+ type TestifylintFormatter struct {
864+ CheckFormatString * bool `mapstructure:"check-format-string"`
865+ RequireFFuncs bool `mapstructure:"require-f-funcs"`
866+ }
849867
850- RequireError struct {
851- FnPattern string `mapstructure:"fn-pattern"`
852- } `mapstructure:"require-error"`
868+ type TestifylintGoRequire struct {
869+ IgnoreHTTPHandlers bool `mapstructure:"ignore-http-handlers"`
870+ }
871+
872+ type TestifylintRequireError struct {
873+ FnPattern string `mapstructure:"fn-pattern"`
874+ }
853875
854- SuiteExtraAssertCall struct {
855- Mode string `mapstructure:"mode"`
856- } `mapstructure:"suite-extra-assert-call"`
876+ type TestifylintSuiteExtraAssertCall struct {
877+ Mode string `mapstructure:"mode"`
857878}
858879
859880type TestpackageSettings struct {
0 commit comments