Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

Commit df7fb6f

Browse files
committed
Merge pull request #24 from imikushin/ignore-dot-dirs
Ignore .dirs in searching for project packages
2 parents 3ebe41f + 3382c94 commit df7fb6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trash.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ func listPackages(rootPackage string) util.Packages {
370370
if !info.IsDir() {
371371
return nil
372372
}
373-
if strings.HasSuffix(path, "/vendor") {
373+
if strings.HasSuffix(path, "/vendor") || strings.HasPrefix(path[strings.LastIndex(path, "/")+1:], ".") {
374374
return filepath.SkipDir
375375
}
376376
pkgs, err := parser.ParseDir(token.NewFileSet(), path, nil, parser.PackageClauseOnly)

0 commit comments

Comments
 (0)