diff --git a/pkg/lint/linter/config.go b/pkg/lint/linter/config.go index 86f78e5a4b8e..d69d9144a779 100644 --- a/pkg/lint/linter/config.go +++ b/pkg/lint/linter/config.go @@ -35,7 +35,7 @@ func (lc *Config) ConsiderSlow() *Config { } func (lc *Config) IsSlowLinter() bool { - return lc.IsSlow || (lc.LoadMode&packages.NeedTypesInfo != 0 && lc.LoadMode&packages.NeedDeps != 0) + return lc.IsSlow } func (lc *Config) WithLoadFiles() *Config { @@ -46,6 +46,7 @@ func (lc *Config) WithLoadFiles() *Config { func (lc *Config) WithLoadForGoAnalysis() *Config { lc = lc.WithLoadFiles() lc.LoadMode |= packages.NeedImports | packages.NeedDeps | packages.NeedExportsFile | packages.NeedTypesSizes + lc.IsSlow = true return lc } diff --git a/pkg/lint/lintersdb/manager.go b/pkg/lint/lintersdb/manager.go index b8a84ac973a6..50083fa36a6f 100644 --- a/pkg/lint/lintersdb/manager.go +++ b/pkg/lint/lintersdb/manager.go @@ -376,6 +376,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { WithURL("https://github.com/nishanths/predeclared"), linter.NewConfig(golinters.NewRevive(reviveCfg)). WithPresets(linter.PresetStyle). + ConsiderSlow(). WithURL("https://github.com/mgechev/revive"), linter.NewConfig(golinters.NewDurationCheck()). WithPresets(linter.PresetBugs).