Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ linters:
- stylecheck
- tagalign
- tagliatelle
- tenv
- testableexamples
- testifylint
- testpackage
Expand Down Expand Up @@ -225,7 +224,6 @@ linters:
- stylecheck
- tagalign
- tagliatelle
- tenv
- testableexamples
- testifylint
- testpackage
Expand All @@ -245,13 +243,14 @@ linters:
- deadcode # Deprecated
- exhaustivestruct # Deprecated
- golint # Deprecated
- gomnd # Deprecated
- ifshort # Deprecated
- interfacer # Deprecated
- maligned # Deprecated
- gomnd # Deprecated
- nosnakecase # Deprecated
- scopelint # Deprecated
- structcheck # Deprecated
- tenv # Deprecated
- varcheck # Deprecated

# Enable presets.
Expand Down Expand Up @@ -3656,8 +3655,8 @@ linters-settings:
os-mkdir-temp: false

# Enable/disable `os.Setenv()` detections.
# Default: false
os-setenv: true
# Default: true
os-setenv: false

# Enable/disable `os.TempDir()` detections.
# Default: false
Expand Down
2 changes: 1 addition & 1 deletion jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3488,7 +3488,7 @@
},
"os-setenv": {
"type": "boolean",
"default": false
"default": true
},
"os-create-temp": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ var defaultLintersSettings = LintersSettings{
ContextTodo: true,
OSChdir: true,
OSMkdirTemp: true,
OSSetenv: false,
OSSetenv: true,
OSTempDir: false,
OSCreateTemp: true,
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/usetesting/testdata/usetesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func Test_osMkdirTemp(t *testing.T) {
}

func Test_osSetenv(t *testing.T) {
os.Setenv("", "")
os.Setenv("", "") // want `os\.Setenv\(\) could be replaced by t\.Setenv\(\) in .+`
}

func Test_osTempDir(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/lint/lintersdb/builder_linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,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").
DeprecatedWarning("Duplicate feature another linter.", "v1.64.0", "usetesting"),

linter.NewConfig(testableexamples.New()).
WithSince("v1.50.0").
Expand Down
Loading