Skip to content

Commit 0e12919

Browse files
committed
fix(tenv): disable for Go versions < 1.17
1 parent b4032c0 commit 0e12919

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pkg/lint/linter/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ func (lc *Config) WithNoopFallback(cfg *config.Config, cond func(cfg *config.Con
163163
return lc
164164
}
165165

166+
func IsGoLowerThanGo117() func(cfg *config.Config) error {
167+
return isGoLowerThanGo("1.17")
168+
}
169+
166170
func IsGoLowerThanGo122() func(cfg *config.Config) error {
167171
return isGoLowerThanGo("1.22")
168172
}

pkg/lint/lintersdb/builder_linter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,8 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
753753
WithSince("v1.43.0").
754754
WithPresets(linter.PresetTest).
755755
WithLoadForGoAnalysis().
756-
WithURL("https://github.com/sivchari/tenv"),
756+
WithURL("https://github.com/sivchari/tenv").
757+
WithNoopFallback(cfg, linter.IsGoLowerThanGo117()),
757758

758759
linter.NewConfig(testableexamples.New()).
759760
WithSince("v1.50.0").

0 commit comments

Comments
 (0)