Skip to content

Commit bc616e8

Browse files
dependabot[bot]alexandearldez
authored
build(deps): bump github.com/go-critic/go-critic from 0.7.0 to 0.8.0 (#3810)
Co-authored-by: Oleksandr Redko <Oleksandr_Redko@epam.com> Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent 58182e7 commit bc616e8

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ require (
3232
github.com/fatih/color v1.15.0
3333
github.com/firefart/nonamedreturns v1.0.4
3434
github.com/fzipp/gocyclo v0.6.0
35-
github.com/go-critic/go-critic v0.7.0
35+
github.com/go-critic/go-critic v0.8.0
3636
github.com/go-xmlfmt/xmlfmt v1.1.2
3737
github.com/gofrs/flock v0.8.1
3838
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ type GoConstSettings struct {
371371
}
372372

373373
type GoCriticSettings struct {
374+
Go string `mapstructure:"-"`
374375
EnabledChecks []string `mapstructure:"enabled-checks"`
375376
DisabledChecks []string `mapstructure:"disabled-checks"`
376377
EnabledTags []string `mapstructure:"enabled-tags"`

pkg/golinters/gocritic.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ func (w *goCriticWrapper) run(pass *analysis.Pass) ([]goanalysis.Issue, error) {
113113

114114
linterCtx := gocriticlinter.NewContext(pass.Fset, w.sizes)
115115

116+
linterCtx.SetGoVersion(w.settingsWrapper.Go)
117+
116118
enabledCheckers, err := w.buildEnabledCheckers(linterCtx)
117119
if err != nil {
118120
return nil, err

pkg/lint/lintersdb/manager.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
263263
govetCfg.Go = m.cfg.Run.Go
264264
}
265265

266+
if gocriticCfg != nil {
267+
gocriticCfg.Go = m.cfg.Run.Go
268+
}
269+
266270
if gofumptCfg != nil && gofumptCfg.LangVersion == "" {
267271
gofumptCfg.LangVersion = m.cfg.Run.Go
268272
}

0 commit comments

Comments
 (0)