Skip to content

Commit bb89304

Browse files
committed
Updated walkfs
1 parent 80f9a59 commit bb89304

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/walkfs/walkfs.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,14 @@ func (walkfs *WalkFS) shouldVisit(info fs.FileInfo) bool {
230230

231231
// shouldExcludePath returns true if the given relative path should be excluded
232232
func (walkfs *WalkFS) shouldExcludePath(relpath string) bool {
233+
// Exclude any paths which have a .<folder> as part of their path
234+
if relpath != "." {
235+
for _, path := range strings.Split(relpath, pathSeparator) {
236+
if strings.HasPrefix(path, ".") {
237+
return true
238+
}
239+
}
240+
}
233241
// Include all files if no inclusions are specified
234242
if len(walkfs.expath) == 0 {
235243
return false

0 commit comments

Comments
 (0)