diff --git a/pkg/lint/linter/config.go b/pkg/lint/linter/config.go index 1e438a0f0368..940642f6847f 100644 --- a/pkg/lint/linter/config.go +++ b/pkg/lint/linter/config.go @@ -163,6 +163,10 @@ func (lc *Config) WithNoopFallback(cfg *config.Config, cond func(cfg *config.Con return lc } +func IsGoLowerThanGo117() func(cfg *config.Config) error { + return isGoLowerThanGo("1.17") +} + func IsGoLowerThanGo122() func(cfg *config.Config) error { return isGoLowerThanGo("1.22") } diff --git a/pkg/lint/lintersdb/builder_linter.go b/pkg/lint/lintersdb/builder_linter.go index 1bf8c402c790..5ac475538512 100644 --- a/pkg/lint/lintersdb/builder_linter.go +++ b/pkg/lint/lintersdb/builder_linter.go @@ -753,7 +753,8 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) { WithSince("v1.43.0"). WithPresets(linter.PresetTest). WithLoadForGoAnalysis(). - WithURL("https://github.com/sivchari/tenv"), + WithURL("https://github.com/sivchari/tenv"). + WithNoopFallback(cfg, linter.IsGoLowerThanGo117()), linter.NewConfig(testableexamples.New()). WithSince("v1.50.0").