Skip to content

Commit 11d508e

Browse files
build(deps): bump github.com/sashamelentyev/usestdlibvars from 1.27.0 to 1.28.0 (#5263)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent cf4c529 commit 11d508e

File tree

6 files changed

+40
-3
lines changed

6 files changed

+40
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ require (
9292
github.com/sanposhiho/wastedassign/v2 v2.1.0
9393
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1
9494
github.com/sashamelentyev/interfacebloat v1.1.0
95-
github.com/sashamelentyev/usestdlibvars v1.27.0
95+
github.com/sashamelentyev/usestdlibvars v1.28.0
9696
github.com/securego/gosec/v2 v2.21.4
9797
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
9898
github.com/shirou/gopsutil/v4 v4.24.11

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.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//golangcitest:args -Eusestdlibvars
2+
//golangcitest:expected_exitcode 0
3+
package testdata
4+
5+
import "net/http"
6+
7+
func _200() {
8+
_ = 200
9+
}
10+
11+
func _200_1() {
12+
var w http.ResponseWriter
13+
w.WriteHeader(200) // want `"200" can be replaced by http.StatusOK`
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//golangcitest:args -Eusestdlibvars
2+
//golangcitest:expected_exitcode 0
3+
package testdata
4+
5+
import "net/http"
6+
7+
func _200() {
8+
_ = 200
9+
}
10+
11+
func _200_1() {
12+
var w http.ResponseWriter
13+
w.WriteHeader(http.StatusOK) // want `"200" can be replaced by http.StatusOK`
14+
}

pkg/golinters/usestdlibvars/usestdlibvars_integration_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ import (
99
func TestFromTestdata(t *testing.T) {
1010
integration.RunTestdata(t)
1111
}
12+
13+
func TestFix(t *testing.T) {
14+
integration.RunFix(t)
15+
}
16+
17+
func TestFixPathPrefix(t *testing.T) {
18+
integration.RunFixPathPrefix(t)
19+
}

pkg/lint/lintersdb/builder_linter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
821821
linter.NewConfig(usestdlibvars.New(&cfg.LintersSettings.UseStdlibVars)).
822822
WithSince("v1.48.0").
823823
WithPresets(linter.PresetStyle).
824+
WithAutoFix().
824825
WithURL("https://github.com/sashamelentyev/usestdlibvars"),
825826

826827
linter.NewConfig(usetesting.New(&cfg.LintersSettings.UseTesting)).

0 commit comments

Comments
 (0)