Skip to content

Commit eb83cbc

Browse files
ldezryancurrah
authored andcommitted
fix: downgrade syntax
1 parent 2cb6ff4 commit eb83cbc

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
linters:
33
enable-all: true
44
disable:
5+
- tenv
56
- lll
67
- gomodguard
78
- gochecknoglobals

processor_test.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,19 @@ func TestProcessorNewProcessor(t *testing.T) {
2525
}
2626

2727
func TestProcessorProcessFiles(t *testing.T) { //nolint:funlen
28-
t.Chdir("_example/allOptions")
28+
backupWd, err := os.Getwd()
29+
if err != nil {
30+
t.Error(err)
31+
}
32+
33+
defer func() { _ = os.Chdir(backupWd) }()
34+
35+
err = os.Chdir("_example/allOptions")
36+
if err != nil {
37+
t.Error(err)
38+
}
2939

30-
cwd, err := os.Getwd()
40+
wd, err := os.Getwd()
3141
if err != nil {
3242
t.Error(err)
3343
}
@@ -76,7 +86,7 @@ func TestProcessorProcessFiles(t *testing.T) { //nolint:funlen
7686
t.Error(err)
7787
}
7888

79-
filteredFiles := filesearch.Find(cwd, false, []string{"./..."})
89+
filteredFiles := filesearch.Find(wd, false, []string{"./..."})
8090

8191
var tests = []struct {
8292
testName string

0 commit comments

Comments
 (0)