@@ -48,9 +48,10 @@ func setupRunFlagSet(v *viper.Viper, fs *pflag.FlagSet) {
48
48
internal .AddFlagAndBind (v , fs , fs .Duration , "timeout" , "run.timeout" , defaultTimeout , color .GreenString ("Timeout for total work" ))
49
49
50
50
internal .AddFlagAndBind (v , fs , fs .Bool , "tests" , "run.tests" , true , color .GreenString ("Analyze tests (*_test.go)" ))
51
+
52
+ fs .StringSlice ("skip-files" , nil , color .GreenString ("Regexps of files to skip" )) // Hack see Loader.applyStringSliceHack
51
53
fs .StringSlice ("skip-dirs" , nil , color .GreenString ("Regexps of directories to skip" )) // Hack see Loader.applyStringSliceHack
52
54
internal .AddFlagAndBind (v , fs , fs .Bool , "skip-dirs-use-default" , "run.skip-dirs-use-default" , true , getDefaultDirectoryExcludeHelp ())
53
- fs .StringSlice ("skip-files" , nil , color .GreenString ("Regexps of files to skip" )) // Hack see Loader.applyStringSliceHack
54
55
55
56
const allowParallelDesc = "Allow multiple parallel golangci-lint instances running. " +
56
57
"If false (default) - golangci-lint acquires file lock on start."
@@ -92,6 +93,11 @@ func setupIssuesFlagSet(v *viper.Viper, fs *pflag.FlagSet) {
92
93
internal .AddFlagAndBind (v , fs , fs .Int , "max-same-issues" , "issues.max-same-issues" , 3 ,
93
94
color .GreenString ("Maximum count of issues with the same text. Set to 0 to disable" ))
94
95
96
+ fs .StringSlice ("exclude-files" , nil , color .GreenString ("Regexps of files to exclude" )) // Hack see Loader.applyStringSliceHack
97
+ fs .StringSlice ("exclude-dirs" , nil , color .GreenString ("Regexps of directories to exclude" )) // Hack see Loader.applyStringSliceHack
98
+ internal .AddFlagAndBind (v , fs , fs .Bool , "exclude-dirs-use-default" , "issues.exclude-dirs-use-default" , true ,
99
+ getDefaultDirectoryExcludeHelp ())
100
+
95
101
const newDesc = "Show only new issues: if there are unstaged changes or untracked files, only those changes " +
96
102
"are analyzed, else only changes in HEAD~ are analyzed.\n It's a super-useful option for integration " +
97
103
"of golangci-lint into existing large codebase.\n It's not practical to fix all existing issues at " +
0 commit comments