Skip to content

Commit 9fd9de6

Browse files
authored
dev: remove useless call to WithLoadForGoAnalysis (#5193)
1 parent 7b15252 commit 9fd9de6

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

pkg/golinters/cyclop/cyclop.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ func New(settings *config.Cyclop) *goanalysis.Linter {
3333
a.Doc,
3434
[]*analysis.Analyzer{a},
3535
cfg,
36-
).WithLoadMode(goanalysis.LoadModeTypesInfo)
36+
).WithLoadMode(goanalysis.LoadModeSyntax)
3737
}

pkg/lint/lintersdb/builder_linter.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
161161
WithSince("v1.58.0").
162162
WithPresets(linter.PresetStyle).
163163
WithLoadForGoAnalysis().
164-
WithURL("https://github.com/lasiar/canonicalHeader"),
164+
WithURL("https://github.com/lasiar/canonicalheader"),
165165

166166
linter.NewConfig(containedctx.New()).
167167
WithSince("v1.44.0").
@@ -183,7 +183,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
183183

184184
linter.NewConfig(cyclop.New(&cfg.LintersSettings.Cyclop)).
185185
WithSince("v1.37.0").
186-
WithLoadForGoAnalysis().
187186
WithPresets(linter.PresetComplexity).
188187
WithURL("https://github.com/bkielbasa/cyclop"),
189188

@@ -194,7 +193,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
194193

195194
linter.NewConfig(linter.NewNoopDeprecated("deadcode", cfg, linter.DeprecationError)).
196195
WithSince("v1.0.0").
197-
WithLoadForGoAnalysis().
198196
WithPresets(linter.PresetUnused).
199197
WithURL("https://github.com/remyoudompheng/go-misc/tree/master/deadcode").
200198
DeprecatedError("The owner seems to have abandoned the linter.", "v1.49.0", "unused"),
@@ -253,7 +251,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
253251
linter.NewConfig(linter.NewNoopDeprecated("execinquery", cfg, linter.DeprecationError)).
254252
WithSince("v1.46.0").
255253
WithPresets(linter.PresetSQL).
256-
WithLoadForGoAnalysis().
257254
WithURL("https://github.com/1uf3/execinquery").
258255
DeprecatedError("The repository of the linter has been archived by the owner.", "v1.58.0", ""),
259256

@@ -266,7 +263,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
266263
linter.NewConfig(linter.NewNoopDeprecated("exhaustivestruct", cfg, linter.DeprecationError)).
267264
WithSince("v1.32.0").
268265
WithPresets(linter.PresetStyle, linter.PresetTest).
269-
WithLoadForGoAnalysis().
270266
WithURL("https://github.com/mbilski/exhaustivestruct").
271267
DeprecatedError("The repository of the linter has been deprecated by the owner.", "v1.46.0", "exhaustruct"),
272268

@@ -408,7 +404,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
408404

409405
linter.NewConfig(linter.NewNoopDeprecated("golint", cfg, linter.DeprecationError)).
410406
WithSince("v1.0.0").
411-
WithLoadForGoAnalysis().
412407
WithPresets(linter.PresetStyle).
413408
WithURL("https://github.com/golang/lint").
414409
DeprecatedError("The repository of the linter has been archived by the owner.", "v1.41.0", "revive"),
@@ -509,7 +504,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
509504

510505
linter.NewConfig(linter.NewNoopDeprecated("interfacer", cfg, linter.DeprecationError)).
511506
WithSince("v1.0.0").
512-
WithLoadForGoAnalysis().
513507
WithPresets(linter.PresetStyle).
514508
WithURL("https://github.com/mvdan/interfacer").
515509
DeprecatedError("The repository of the linter has been archived by the owner.", "v1.38.0", ""),
@@ -551,7 +545,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
551545

552546
linter.NewConfig(linter.NewNoopDeprecated("maligned", cfg, linter.DeprecationError)).
553547
WithSince("v1.0.0").
554-
WithLoadForGoAnalysis().
555548
WithPresets(linter.PresetPerformance).
556549
WithURL("https://github.com/mdempsky/maligned").
557550
DeprecatedError("The repository of the linter has been archived by the owner.", "v1.38.0", "govet 'fieldalignment'"),
@@ -717,7 +710,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
717710

718711
linter.NewConfig(linter.NewNoopDeprecated("structcheck", cfg, linter.DeprecationError)).
719712
WithSince("v1.0.0").
720-
WithLoadForGoAnalysis().
721713
WithPresets(linter.PresetUnused).
722714
WithURL("https://github.com/opennota/check").
723715
DeprecatedError("The owner seems to have abandoned the linter.", "v1.49.0", "unused"),
@@ -814,7 +806,6 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
814806

815807
linter.NewConfig(linter.NewNoopDeprecated("varcheck", cfg, linter.DeprecationError)).
816808
WithSince("v1.0.0").
817-
WithLoadForGoAnalysis().
818809
WithPresets(linter.PresetUnused).
819810
WithURL("https://github.com/opennota/check").
820811
DeprecatedError("The owner seems to have abandoned the linter.", "v1.49.0", "unused"),

0 commit comments

Comments
 (0)