@@ -49,9 +49,12 @@ func setupRunFlagSet(v *viper.Viper, fs *pflag.FlagSet) {
49
49
50
50
internal .AddFlagAndBind (v , fs , fs .Bool , "tests" , "run.tests" , true , color .GreenString ("Analyze tests (*_test.go)" ))
51
51
52
- fs .StringSlice ("skip-files" , nil , color .GreenString ("Regexps of files to skip" )) // Hack see Loader.applyStringSliceHack
52
+ fs .StringSlice ("skip-files" , nil , color .GreenString ("Regexps of files to skip" )) // Hack see Loader.applyStringSliceHack
53
+ deprecateFlag (fs , "skip-files" )
53
54
fs .StringSlice ("skip-dirs" , nil , color .GreenString ("Regexps of directories to skip" )) // Hack see Loader.applyStringSliceHack
55
+ deprecateFlag (fs , "skip-dirs" )
54
56
internal .AddFlagAndBind (v , fs , fs .Bool , "skip-dirs-use-default" , "run.skip-dirs-use-default" , true , getDefaultDirectoryExcludeHelp ())
57
+ deprecateFlag (fs , "skip-dirs-use-default" )
55
58
56
59
const allowParallelDesc = "Allow multiple parallel golangci-lint instances running. " +
57
60
"If false (default) - golangci-lint acquires file lock on start."
@@ -135,3 +138,8 @@ func getDefaultDirectoryExcludeHelp() string {
135
138
parts = append (parts , "" )
136
139
return strings .Join (parts , "\n " )
137
140
}
141
+
142
+ func deprecateFlag (fs * pflag.FlagSet , name string ) {
143
+ _ = fs .MarkHidden (name )
144
+ _ = fs .MarkDeprecated (name , "check the documentation for more information." )
145
+ }
0 commit comments