mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Don't typecheck directories that start with _
Go ignores them, so should we.
This commit is contained in:
parent
cb37c08846
commit
a2f26075c8
@ -266,7 +266,7 @@ func (c *collector) handlePath(path string, info os.FileInfo, err error) error {
|
||||
}
|
||||
if info.IsDir() {
|
||||
// Ignore hidden directories (.git, .cache, etc)
|
||||
if len(path) > 1 && path[0] == '.' {
|
||||
if len(path) > 1 && (path[0] == '.' || path[0] == '_') {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
for _, dir := range c.ignoreDirs {
|
||||
|
Loading…
Reference in New Issue
Block a user