@@ -158,12 +158,27 @@ func initFlagSet(fs *pflag.FlagSet, cfg *config.Config, m *lintersdb.Manager, is
158158 150 , "Dupl: Minimal threshold to detect copy-paste" )
159159 hideFlag ("dupl.threshold" )
160160
161+ fs .BoolVar (& lsc .Goconst .MatchWithConstants , "goconst.match-constant" ,
162+ true , "Goconst: look for existing constants matching the values" )
163+ hideFlag ("goconst.match-constant" )
161164 fs .IntVar (& lsc .Goconst .MinStringLen , "goconst.min-len" ,
162165 3 , "Goconst: minimum constant string length" )
163166 hideFlag ("goconst.min-len" )
164167 fs .IntVar (& lsc .Goconst .MinOccurrencesCount , "goconst.min-occurrences" ,
165168 3 , "Goconst: minimum occurrences of constant string count to trigger issue" )
166169 hideFlag ("goconst.min-occurrences" )
170+ fs .BoolVar (& lsc .Goconst .ParseNumbers , "goconst.numbers" ,
171+ false , "Goconst: search also for duplicated numbers" )
172+ hideFlag ("goconst.numbers" )
173+ fs .IntVar (& lsc .Goconst .NumberMin , "goconst.min" ,
174+ 3 , "minimum value, only works with goconst.numbers" )
175+ hideFlag ("goconst.min" )
176+ fs .IntVar (& lsc .Goconst .NumberMax , "goconst.max" ,
177+ 3 , "maximum value, only works with goconst.numbers" )
178+ hideFlag ("goconst.max" )
179+ fs .BoolVar (& lsc .Goconst .IgnoreCalls , "goconst.ignore-calls" ,
180+ true , "Goconst: ignore when constant is not used as function argument" )
181+ hideFlag ("goconst.ignore-calls" )
167182
168183 // (@dixonwille) These flag is only used for testing purposes.
169184 fs .StringSliceVar (& lsc .Depguard .Packages , "depguard.packages" , nil ,
0 commit comments