@@ -113,6 +113,10 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
113113 var goModDirectivesCfg * config.GoModDirectivesSettings
114114 var tagliatelleCfg * config.TagliatelleSettings
115115 var gosecCfg * config.GoSecSettings
116+ var gosimpleCfg * config.StaticCheckSettings
117+ var staticcheckCfg * config.StaticCheckSettings
118+ var stylecheckCfg * config.StaticCheckSettings
119+ var unusedCfg * config.StaticCheckSettings
116120
117121 if m .cfg != nil {
118122 govetCfg = & m .cfg .LintersSettings .Govet
@@ -129,6 +133,10 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
129133 goModDirectivesCfg = & m .cfg .LintersSettings .GoModDirectives
130134 tagliatelleCfg = & m .cfg .LintersSettings .Tagliatelle
131135 gosecCfg = & m .cfg .LintersSettings .Gosec
136+ gosimpleCfg = & m .cfg .LintersSettings .Gosimple
137+ staticcheckCfg = & m .cfg .LintersSettings .Staticcheck
138+ stylecheckCfg = & m .cfg .LintersSettings .Stylecheck
139+ unusedCfg = & m .cfg .LintersSettings .Unused
132140 }
133141
134142 const megacheckName = "megacheck"
@@ -166,28 +174,28 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
166174 WithPresets (linter .PresetBugs , linter .PresetSQL ).
167175 WithURL ("https://github.com/jingyugao/rowserrcheck" ),
168176
169- linter .NewConfig (golinters .NewStaticcheck ()).
177+ linter .NewConfig (golinters .NewStaticcheck (staticcheckCfg )).
170178 WithSince ("v1.0.0" ).
171179 WithLoadForGoAnalysis ().
172180 WithPresets (linter .PresetBugs , linter .PresetMetaLinter ).
173181 WithAlternativeNames (megacheckName ).
174182 WithURL ("https://staticcheck.io/" ),
175- linter .NewConfig (golinters .NewUnused ()).
183+ linter .NewConfig (golinters .NewUnused (unusedCfg )).
176184 WithSince ("v1.20.0" ).
177185 WithLoadForGoAnalysis ().
178186 WithPresets (linter .PresetUnused ).
179187 WithAlternativeNames (megacheckName ).
180188 ConsiderSlow ().
181189 WithChangeTypes ().
182190 WithURL ("https://github.com/dominikh/go-tools/tree/master/unused" ),
183- linter .NewConfig (golinters .NewGosimple ()).
191+ linter .NewConfig (golinters .NewGosimple (gosimpleCfg )).
184192 WithSince ("v1.20.0" ).
185193 WithLoadForGoAnalysis ().
186194 WithPresets (linter .PresetStyle ).
187195 WithAlternativeNames (megacheckName ).
188196 WithURL ("https://github.com/dominikh/go-tools/tree/master/simple" ),
189197
190- linter .NewConfig (golinters .NewStylecheck ()).
198+ linter .NewConfig (golinters .NewStylecheck (stylecheckCfg )).
191199 WithSince ("v1.20.0" ).
192200 WithLoadForGoAnalysis ().
193201 WithPresets (linter .PresetStyle ).
@@ -499,16 +507,16 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
499507 }
500508
501509 enabledByDefault := map [string ]bool {
502- golinters .NewGovet (nil ).Name (): true ,
503- golinters .NewErrcheck ().Name (): true ,
504- golinters .NewStaticcheck ().Name (): true ,
505- golinters .NewUnused ().Name (): true ,
506- golinters .NewGosimple ().Name (): true ,
507- golinters .NewStructcheck ().Name (): true ,
508- golinters .NewVarcheck ().Name (): true ,
509- golinters .NewIneffassign ().Name (): true ,
510- golinters .NewDeadcode ().Name (): true ,
511- golinters .NewTypecheck ().Name (): true ,
510+ golinters .NewGovet (nil ).Name (): true ,
511+ golinters .NewErrcheck ().Name (): true ,
512+ golinters .NewStaticcheck (staticcheckCfg ).Name (): true ,
513+ golinters .NewUnused (unusedCfg ).Name (): true ,
514+ golinters .NewGosimple (gosimpleCfg ).Name (): true ,
515+ golinters .NewStructcheck ().Name (): true ,
516+ golinters .NewVarcheck ().Name (): true ,
517+ golinters .NewIneffassign ().Name (): true ,
518+ golinters .NewDeadcode ().Name (): true ,
519+ golinters .NewTypecheck ().Name (): true ,
512520 }
513521 return enableLinterConfigs (lcs , func (lc * linter.Config ) bool {
514522 return enabledByDefault [lc .Name ()]
0 commit comments