Skip to content

Commit

Permalink
fix(zombie): ignore mocks in vendor (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanposhiho committed Sep 27, 2022
1 parent 7116642 commit 2675bfb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/util/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strings"
)

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

var paths []string
for _, file := range files {
if strings.Contains(file.Name(), "vendor") {
// vendor dir should be ignored.
continue
}

if file.IsDir() {
childPaths, err := Tree(filepath.Join(dir, file.Name()))
if err != nil {
Expand Down

0 comments on commit 2675bfb

Please sign in to comment.