File tree 2 files changed +14
-3
lines changed 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 2
2
linters :
3
3
enable-all : true
4
4
disable :
5
+ - tenv
5
6
- lll
6
7
- gomodguard
7
8
- gochecknoglobals
Original file line number Diff line number Diff line change @@ -25,9 +25,19 @@ func TestProcessorNewProcessor(t *testing.T) {
25
25
}
26
26
27
27
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
+ }
29
39
30
- cwd , err := os .Getwd ()
40
+ wd , err := os .Getwd ()
31
41
if err != nil {
32
42
t .Error (err )
33
43
}
@@ -76,7 +86,7 @@ func TestProcessorProcessFiles(t *testing.T) { //nolint:funlen
76
86
t .Error (err )
77
87
}
78
88
79
- filteredFiles := filesearch .Find (cwd , false , []string {"./..." })
89
+ filteredFiles := filesearch .Find (wd , false , []string {"./..." })
80
90
81
91
var tests = []struct {
82
92
testName string
You can’t perform that action at this time.
0 commit comments