@@ -200,7 +200,7 @@ type LintersSettings struct {
200
200
Asasalint AsasalintSettings `mapstructure:"asasalint"`
201
201
BiDiChk BiDiChkSettings `mapstructure:"bidichk"`
202
202
CopyLoopVar CopyLoopVarSettings `mapstructure:"copyloopvar"`
203
- Cyclop Cyclop `mapstructure:"cyclop"`
203
+ Cyclop CyclopSettings `mapstructure:"cyclop"`
204
204
Decorder DecorderSettings `mapstructure:"decorder"`
205
205
Depguard DepGuardSettings `mapstructure:"depguard"`
206
206
Dogsled DogsledSettings `mapstructure:"dogsled"`
@@ -314,7 +314,7 @@ type CopyLoopVarSettings struct {
314
314
CheckAlias bool `mapstructure:"check-alias"`
315
315
}
316
316
317
- type Cyclop struct {
317
+ type CyclopSettings struct {
318
318
MaxComplexity int `mapstructure:"max-complexity"`
319
319
PackageAverage float64 `mapstructure:"package-average"`
320
320
}
@@ -505,21 +505,29 @@ type GoModDirectivesSettings struct {
505
505
}
506
506
507
507
type 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"`
523
531
}
524
532
525
533
type GoSecSettings struct {
@@ -545,7 +553,7 @@ type GovetSettings struct {
545
553
EnableAll bool `mapstructure:"enable-all"`
546
554
DisableAll bool `mapstructure:"disable-all"`
547
555
548
- Settings map [string ]map [string ]any
556
+ Settings map [string ]map [string ]any `mapstructure:"settings"`
549
557
}
550
558
551
559
func (cfg * GovetSettings ) Validate () error {
@@ -638,11 +646,13 @@ type MisspellExtraWords struct {
638
646
}
639
647
640
648
type 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"`
646
656
}
647
657
648
658
type NakedretSettings struct {
@@ -703,7 +713,7 @@ type PerfSprintSettings struct {
703
713
}
704
714
705
715
type PreallocSettings struct {
706
- Simple bool
716
+ Simple bool `mapstructure:"simple"`
707
717
RangeLoops bool `mapstructure:"range-loops"`
708
718
ForLoops bool `mapstructure:"for-loops"`
709
719
}
@@ -735,24 +745,28 @@ type RecvcheckSettings struct {
735
745
}
736
746
737
747
type 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"`
756
770
}
757
771
758
772
type RowsErrCheckSettings struct {
@@ -830,30 +844,37 @@ type TestifylintSettings struct {
830
844
EnabledCheckers []string `mapstructure:"enable"`
831
845
DisabledCheckers []string `mapstructure:"disable"`
832
846
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
+ }
836
854
837
- ExpectedActual struct {
838
- ExpVarPattern string `mapstructure:"pattern "`
839
- } `mapstructure:"expected-actual"`
855
+ type TestifylintBoolCompare struct {
856
+ IgnoreCustomTypes bool `mapstructure:"ignore-custom-types "`
857
+ }
840
858
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
+ }
845
862
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
+ }
849
867
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
+ }
853
875
854
- SuiteExtraAssertCall struct {
855
- Mode string `mapstructure:"mode"`
856
- } `mapstructure:"suite-extra-assert-call"`
876
+ type TestifylintSuiteExtraAssertCall struct {
877
+ Mode string `mapstructure:"mode"`
857
878
}
858
879
859
880
type TestpackageSettings struct {
0 commit comments