Skip to content

Commit e794dd0

Browse files
authored
Merge pull request #3470 from alexandear-org/enable-usetesting
Enable usetesting linter
2 parents ef25b90 + 01b435a commit e794dd0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.golangci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ linters:
2626
- revive
2727
- staticcheck
2828
- unused
29+
- usetesting
2930
- whitespace
3031
settings:
3132
depguard:
@@ -119,6 +120,8 @@ linters:
119120
- -ST1000
120121
- -ST1001 # duplicates revive.dot-imports
121122
- -ST1022
123+
usetesting:
124+
os-temp-dir: true
122125
exclusions:
123126
presets:
124127
- common-false-positives

pkg/limayaml/defaults_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func TestFillDefault(t *testing.T) {
148148
Mounts: []Mount{
149149
// Location will be passed through localpathutil.Expand() which will normalize the name
150150
// (add a drive letter). So we must start with a valid local path to match it again later.
151-
{Location: filepath.Clean(os.TempDir())},
151+
{Location: filepath.Clean(t.TempDir())},
152152
{Location: "{{.Dir}}/{{.Param.ONE}}", MountPoint: ptr.Of("/mnt/{{.Param.ONE}}")},
153153
},
154154
MountType: ptr.Of(NINEP),

0 commit comments

Comments
 (0)