Skip to content

Commit 7b39ece

Browse files
committed
bump dependency ttempdir to v0.3.1
1 parent 7abfa9b commit 7b39ece

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ require (
8383
github.com/nishanths/exhaustive v0.12.0
8484
github.com/nishanths/predeclared v0.2.2
8585
github.com/nunnatsa/ginkgolinter v0.16.2
86-
github.com/peczenyj/ttempdir v0.3.0
86+
github.com/peczenyj/ttempdir v0.3.1
8787
github.com/pelletier/go-toml/v2 v2.2.2
8888
github.com/polyfloyd/go-errorlint v1.5.2
8989
github.com/quasilyte/go-ruleguard/dsl v0.3.22

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.

pkg/golinters/ttempdir/testdata/ttempdir.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ var (
1212
)
1313

1414
func testsetup() {
15-
os.MkdirTemp("a", "b") // if -all = true, want "os\\.MkdirTemp\\(\\) can be replaced by `testing\\.TempDir\\(\\)` in testsetup"
16-
_, err := os.MkdirTemp("a", "b") // if -all = true, want "os\\.MkdirTemp\\(\\) can be replaced by `testing\\.TempDir\\(\\)` in testsetup"
15+
os.MkdirTemp("a", "b") // if -all = true, want "os\\.MkdirTemp\\(\\) should be replaced by `testing\\.TempDir\\(\\)` in testsetup"
16+
_, err := os.MkdirTemp("a", "b") // if -all = true, want "os\\.MkdirTemp\\(\\) should be replaced by `testing\\.TempDir\\(\\)` in testsetup"
1717
if err != nil {
1818
_ = err
1919
}
@@ -22,49 +22,49 @@ func testsetup() {
2222

2323
func TestF(t *testing.T) {
2424
testsetup()
25-
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `t\\.TempDir\\(\\)` in TestF"
26-
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `t\\.TempDir\\(\\)` in TestF"
25+
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `t\\.TempDir\\(\\)` in TestF"
26+
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `t\\.TempDir\\(\\)` in TestF"
2727
_ = err
28-
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) can be replaced by `t\\.TempDir\\(\\)` in TestF"
28+
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) should be replaced by `t\\.TempDir\\(\\)` in TestF"
2929
_ = err
3030
}
3131
}
3232

3333
func BenchmarkF(b *testing.B) {
3434
TB(b)
35-
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `b\\.TempDir\\(\\)` in BenchmarkF"
36-
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `b\\.TempDir\\(\\)` in BenchmarkF"
35+
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `b\\.TempDir\\(\\)` in BenchmarkF"
36+
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `b\\.TempDir\\(\\)` in BenchmarkF"
3737
_ = err
38-
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) can be replaced by `b\\.TempDir\\(\\)` in BenchmarkF"
38+
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) should be replaced by `b\\.TempDir\\(\\)` in BenchmarkF"
3939
_ = err
4040
}
4141
}
4242

4343
func TB(tb testing.TB) {
44-
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `tb\\.TempDir\\(\\)` in TB"
45-
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `tb\\.TempDir\\(\\)` in TB"
44+
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `tb\\.TempDir\\(\\)` in TB"
45+
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `tb\\.TempDir\\(\\)` in TB"
4646
_ = err
47-
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) can be replaced by `tb\\.TempDir\\(\\)` in TB"
47+
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) should be replaced by `tb\\.TempDir\\(\\)` in TB"
4848
_ = err
4949
}
5050
}
5151

5252
func FuzzF(f *testing.F) {
53-
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `f\\.TempDir\\(\\)` in FuzzF"
54-
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `f\\.TempDir\\(\\)` in FuzzF"
53+
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `f\\.TempDir\\(\\)` in FuzzF"
54+
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `f\\.TempDir\\(\\)` in FuzzF"
5555
_ = err
56-
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) can be replaced by `f\\.TempDir\\(\\)` in FuzzF"
56+
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) should be replaced by `f\\.TempDir\\(\\)` in FuzzF"
5757
_ = err
5858
}
5959
}
6060

6161
func TestFunctionLiteral(t *testing.T) {
6262
testsetup()
6363
t.Run("test", func(t *testing.T) {
64-
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `t\\.TempDir\\(\\)` in anonymous function"
65-
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) can be replaced by `t\\.TempDir\\(\\)` in anonymous function"
64+
os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `t\\.TempDir\\(\\)` in anonymous function"
65+
_, err := os.MkdirTemp("a", "b") // want "os\\.MkdirTemp\\(\\) should be replaced by `t\\.TempDir\\(\\)` in anonymous function"
6666
_ = err
67-
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) can be replaced by `t\\.TempDir\\(\\)` in anonymous function"
67+
if _, err := os.MkdirTemp("a", "b"); err != nil { // want "os\\.MkdirTemp\\(\\) should be replaced by `t\\.TempDir\\(\\)` in anonymous function"
6868
_ = err
6969
}
7070
})

0 commit comments

Comments
 (0)