@@ -15,16 +15,17 @@ import (
15
15
)
16
16
17
17
func setupLintersFlagSet (v * viper.Viper , fs * pflag.FlagSet ) {
18
- internal . VibraP ( v , fs , fs .StringSliceP , "disable" , "D" , "linters.disable" , nil , wh ("Disable specific linter" ))
18
+ fs .StringSliceP ( "disable" , "D" , nil , wh ("Disable specific linter" )) // Hack see Loader.appendStringSlice
19
19
internal .Vibra (v , fs , fs .Bool , "disable-all" , "linters.disable-all" , false , wh ("Disable all linters" ))
20
20
21
- internal . VibraP ( v , fs , fs .StringSliceP , "enable" , "E" , "linters.enable" , nil , wh ("Enable specific linter" ))
21
+ fs .StringSliceP ( "enable" , "E" , nil , wh ("Enable specific linter" )) // Hack see Loader.appendStringSlice
22
22
internal .Vibra (v , fs , fs .Bool , "enable-all" , "linters.enable-all" , false , wh ("Enable all linters" ))
23
23
24
24
internal .Vibra (v , fs , fs .Bool , "fast" , "linters.fast" , false ,
25
25
wh ("Enable only fast linters from enabled linters set (first run won't be fast)" ))
26
26
27
- internal .VibraP (v , fs , fs .StringSliceP , "presets" , "p" , "linters.presets" , nil ,
27
+ // Hack see Loader.appendStringSlice
28
+ fs .StringSliceP ("presets" , "p" , nil ,
28
29
wh (fmt .Sprintf ("Enable presets (%s) of linters. Run 'golangci-lint help linters' to see " +
29
30
"them. This option implies option --disable-all" , strings .Join (lintersdb .AllPresets (), "|" ))))
30
31
}
@@ -38,14 +39,14 @@ func setupRunFlagSet(v *viper.Viper, fs *pflag.FlagSet) {
38
39
internal .Vibra (v , fs , fs .Int , "issues-exit-code" , "run.issues-exit-code" , exitcodes .IssuesFound ,
39
40
wh ("Exit code when issues were found" ))
40
41
internal .Vibra (v , fs , fs .String , "go" , "run.go" , "" , wh ("Targeted Go version" ))
41
- internal . Vibra ( v , fs , fs .StringSlice , "build-tags" , "run.build-tags" , nil , wh ("Build tags" ))
42
+ fs .StringSlice ( "build-tags" , nil , wh ("Build tags" )) // Hack see Loader.appendStringSlice
42
43
43
44
internal .Vibra (v , fs , fs .Duration , "timeout" , "run.timeout" , defaultTimeout , wh ("Timeout for total work" ))
44
45
45
46
internal .Vibra (v , fs , fs .Bool , "tests" , "run.tests" , true , wh ("Analyze tests (*_test.go)" ))
46
- internal . Vibra ( v , fs , fs .StringSlice , "skip-dirs" , "run.skip-dirs" , nil , wh ("Regexps of directories to skip" ))
47
+ fs .StringSlice ( "skip-dirs" , nil , wh ("Regexps of directories to skip" )) // Hack see Loader.appendStringSlice
47
48
internal .Vibra (v , fs , fs .Bool , "skip-dirs-use-default" , "run.skip-dirs-use-default" , true , getDefaultDirectoryExcludeHelp ())
48
- internal . Vibra ( v , fs , fs .StringSlice , "skip-files" , "run.skip-files" , nil , wh ("Regexps of files to skip" ))
49
+ fs .StringSlice ( "skip-files" , nil , wh ("Regexps of files to skip" )) // Hack see Loader.appendStringSlice
49
50
50
51
const allowParallelDesc = "Allow multiple parallel golangci-lint instances running. " +
51
52
"If false (default) - golangci-lint acquires file lock on start."
@@ -69,7 +70,7 @@ func setupOutputFlagSet(v *viper.Viper, fs *pflag.FlagSet) {
69
70
70
71
//nolint:gomnd
71
72
func setupIssuesFlagSet (v * viper.Viper , fs * pflag.FlagSet ) {
72
- internal . VibraP ( v , fs , fs .StringSliceP , "exclude" , "e" , "issues.exclude" , nil , wh ("Exclude issue by regexp" ))
73
+ fs .StringSliceP ( "exclude" , "e" , nil , wh ("Exclude issue by regexp" )) // Hack see Loader.appendStringSlice
73
74
internal .Vibra (v , fs , fs .Bool , "exclude-use-default" , "issues.exclude-use-default" , true , getDefaultIssueExcludeHelp ())
74
75
internal .Vibra (v , fs , fs .Bool , "exclude-case-sensitive" , "issues.exclude-case-sensitive" , false ,
75
76
wh ("If set to true exclude and exclude rules regular expressions are case-sensitive" ))
0 commit comments