diff --git a/go.mod b/go.mod index c9cab6fd994b..473739da98ed 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/golangci/golangci-lint -go 1.21 +go 1.21.0 require ( 4d63.com/gocheckcompilerdirectives v1.2.1 @@ -97,7 +97,7 @@ require ( github.com/shirou/gopsutil/v3 v3.24.5 github.com/sirupsen/logrus v1.9.3 github.com/sivchari/containedctx v1.0.3 - github.com/sivchari/tenv v1.7.1 + github.com/sivchari/tenv v1.9.1 github.com/sonatard/noctx v0.0.2 github.com/sourcegraph/go-diff v0.7.0 github.com/spf13/cobra v1.7.0 diff --git a/go.sum b/go.sum index 011af4f75e75..c1b77a5d5526 100644 --- a/go.sum +++ b/go.sum @@ -496,8 +496,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= -github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= +github.com/sivchari/tenv v1.9.1 h1:8OnnAteRw5ailLV0KqXce2ZKn5RwHH6QVFsJ6RMccnM= +github.com/sivchari/tenv v1.9.1/go.mod h1:tdY24masnVoZFxYrHv/nD6Tc8FbkEtAQEEziXpyMgqY= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= diff --git a/pkg/golinters/tenv/testdata/tenv.go b/pkg/golinters/tenv/testdata/tenv_default.go similarity index 96% rename from pkg/golinters/tenv/testdata/tenv.go rename to pkg/golinters/tenv/testdata/tenv_default.go index 986b2f5daee4..a5e0c44b1475 100644 --- a/pkg/golinters/tenv/testdata/tenv.go +++ b/pkg/golinters/tenv/testdata/tenv_default.go @@ -1,5 +1,4 @@ //golangcitest:args -Etenv -//golangcitest:config_path testdata/tenv_all.yml package testdata import ( diff --git a/pkg/golinters/tenv/testdata/tenv_test.go b/pkg/golinters/tenv/testdata/tenv_default_test.go similarity index 100% rename from pkg/golinters/tenv/testdata/tenv_test.go rename to pkg/golinters/tenv/testdata/tenv_default_test.go diff --git a/pkg/golinters/tenv/testdata/tenv_fuzz.go b/pkg/golinters/tenv/testdata/tenv_fuzz.go deleted file mode 100644 index 02d2ca48ae86..000000000000 --- a/pkg/golinters/tenv/testdata/tenv_fuzz.go +++ /dev/null @@ -1,16 +0,0 @@ -//golangcitest:args -Etenv -package testdata - -import ( - "os" - "testing" -) - -func FuzzF(f *testing.F) { - os.Setenv("a", "b") // want "os\\.Setenv\\(\\) can be replaced by `f\\.Setenv\\(\\)` in FuzzF" - err := os.Setenv("a", "b") // want "os\\.Setenv\\(\\) can be replaced by `f\\.Setenv\\(\\)` in FuzzF" - _ = err - if err := os.Setenv("a", "b"); err != nil { // want "os\\.Setenv\\(\\) can be replaced by `f\\.Setenv\\(\\)` in FuzzF" - _ = err - } -} diff --git a/pkg/lint/lintersdb/builder_linter.go b/pkg/lint/lintersdb/builder_linter.go index a66f2eea0933..7b83a81530a7 100644 --- a/pkg/lint/lintersdb/builder_linter.go +++ b/pkg/lint/lintersdb/builder_linter.go @@ -725,7 +725,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) { linter.NewConfig(tenv.New(&cfg.LintersSettings.Tenv)). WithSince("v1.43.0"). - WithPresets(linter.PresetStyle). + WithPresets(linter.PresetTest). WithLoadForGoAnalysis(). WithURL("https://github.com/sivchari/tenv"), @@ -747,7 +747,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) { linter.NewConfig(thelper.New(&cfg.LintersSettings.Thelper)). WithSince("v1.34.0"). - WithPresets(linter.PresetStyle). + WithPresets(linter.PresetTest). WithLoadForGoAnalysis(). WithURL("https://github.com/kulti/thelper"),