Skip to content

Commit

Permalink
dev: remove useless call to WithLoadForGoAnalysis (#5193)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Dec 6, 2024
1 parent 7b15252 commit 9fd9de6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/golinters/cyclop/cyclop.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ func New(settings *config.Cyclop) *goanalysis.Linter {
a.Doc,
[]*analysis.Analyzer{a},
cfg,
).WithLoadMode(goanalysis.LoadModeTypesInfo)
).WithLoadMode(goanalysis.LoadModeSyntax)
}
11 changes: 1 addition & 10 deletions pkg/lint/lintersdb/builder_linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
WithSince("v1.58.0").
WithPresets(linter.PresetStyle).
WithLoadForGoAnalysis().
WithURL("https://github.com/lasiar/canonicalHeader"),
WithURL("https://github.com/lasiar/canonicalheader"),

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

linter.NewConfig(cyclop.New(&cfg.LintersSettings.Cyclop)).
WithSince("v1.37.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetComplexity).
WithURL("https://github.com/bkielbasa/cyclop"),

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

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

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

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

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

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

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

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

linter.NewConfig(linter.NewNoopDeprecated("varcheck", cfg, linter.DeprecationError)).
WithSince("v1.0.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetUnused).
WithURL("https://github.com/opennota/check").
DeprecatedError("The owner seems to have abandoned the linter.", "v1.49.0", "unused"),
Expand Down

0 comments on commit 9fd9de6

Please # to comment.