Skip to content

Commit 2675bfb

Browse files
authored
fix(zombie): ignore mocks in vendor (#84)
1 parent 7116642 commit 2675bfb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/util/files.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"io/ioutil"
99
"os"
1010
"path/filepath"
11+
"strings"
1112
)
1213

1314
func Tree(dir string) ([]string, error) {
@@ -18,6 +19,11 @@ func Tree(dir string) ([]string, error) {
1819

1920
var paths []string
2021
for _, file := range files {
22+
if strings.Contains(file.Name(), "vendor") {
23+
// vendor dir should be ignored.
24+
continue
25+
}
26+
2127
if file.IsDir() {
2228
childPaths, err := Tree(filepath.Join(dir, file.Name()))
2329
if err != nil {

0 commit comments

Comments
 (0)