From b0f1d2da26a68cc3ee6de01d285ee827e8c8b334 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 26 Feb 2023 12:53:56 +0000 Subject: [PATCH 1/2] build(deps): bump github.com/ashanbrown/forbidigo from 1.4.0 to 1.5.1 Bumps [github.com/ashanbrown/forbidigo](https://github.com/ashanbrown/forbidigo) from 1.4.0 to 1.5.1. - [Release notes](https://github.com/ashanbrown/forbidigo/releases) - [Commits](https://github.com/ashanbrown/forbidigo/compare/v1.4.0...v1.5.1) --- updated-dependencies: - dependency-name: github.com/ashanbrown/forbidigo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 3 +-- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 3bae316d165a..4e3c96ec3158 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/OpenPeeDeeP/depguard v1.1.1 github.com/alexkohler/prealloc v1.0.0 github.com/alingse/asasalint v0.0.11 - github.com/ashanbrown/forbidigo v1.4.0 + github.com/ashanbrown/forbidigo v1.5.1 github.com/ashanbrown/makezero v1.1.1 github.com/bkielbasa/cyclop v1.2.0 github.com/blizzy78/varnamelen v0.8.0 @@ -153,7 +153,6 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.12.1 // indirect diff --git a/go.sum b/go.sum index 9096ff5693d5..9617738b5b69 100644 --- a/go.sum +++ b/go.sum @@ -69,8 +69,8 @@ github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQ github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/ashanbrown/forbidigo v1.4.0 h1:spdPbupaSqtWORq1Q4eHBoPBmHtwVyLKwaedbSLc5Sw= -github.com/ashanbrown/forbidigo v1.4.0/go.mod h1:IvgwB5Y4fzqSAj/WVXKWigoTkB0dzI2FBbpKWuh7ph8= +github.com/ashanbrown/forbidigo v1.5.1 h1:WXhzLjOlnuDYPYQo/eFlcFMi8X/kLfvWLYu6CSoebis= +github.com/ashanbrown/forbidigo v1.5.1/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= From f5a69994d7f4fd55f9af3b74230fe5aca81085f0 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sun, 26 Feb 2023 14:55:56 +0100 Subject: [PATCH 2/2] applies new requirements: now forbidogo is a slow linter --- pkg/golinters/forbidigo.go | 2 +- pkg/lint/lintersdb/manager.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/golinters/forbidigo.go b/pkg/golinters/forbidigo.go index a3f5c56d226d..4879cca027a0 100644 --- a/pkg/golinters/forbidigo.go +++ b/pkg/golinters/forbidigo.go @@ -47,7 +47,7 @@ func NewForbidigo(settings *config.ForbidigoSettings) *goanalysis.Linter { nil, ).WithIssuesReporter(func(*linter.Context) []goanalysis.Issue { return resIssues - }).WithLoadMode(goanalysis.LoadModeSyntax) + }).WithLoadMode(goanalysis.LoadModeTypesInfo) } func runForbidigo(pass *analysis.Pass, settings *config.ForbidigoSettings) ([]goanalysis.Issue, error) { diff --git a/pkg/lint/lintersdb/manager.go b/pkg/lint/lintersdb/manager.go index 6f406f7d26e3..7cc64e588e0f 100644 --- a/pkg/lint/lintersdb/manager.go +++ b/pkg/lint/lintersdb/manager.go @@ -417,6 +417,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { linter.NewConfig(golinters.NewForbidigo(forbidigoCfg)). WithSince("v1.34.0"). WithPresets(linter.PresetStyle). + WithLoadForGoAnalysis(). WithURL("https://github.com/ashanbrown/forbidigo"), linter.NewConfig(golinters.NewForceTypeAssert()).