Skip to content

Commit

Permalink
Merge pull request #7 from mysteriumnetwork/fix-file-path-excludes
Browse files Browse the repository at this point in the history
Exclude root from checks
  • Loading branch information
tadaskay authored Sep 17, 2019
2 parents 53879a7 + 8825033 commit 78a29f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions util/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ func GoLintExcludes() []string {
func GetProjectFileDirectories(paths []string) ([]string, error) {
directories := make([]string, 0)

err := filepath.Walk("./", func(path string, info os.FileInfo, err error) error {
if info.IsDir() && !IsPathExcluded(paths, path) {
root := "./"
err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
if info.IsDir() && !IsPathExcluded(paths, path) && path != root {
directories = append(directories, path)
}
return nil
Expand Down

0 comments on commit 78a29f2

Please sign in to comment.