Skip to content

Commit

Permalink
cli/fix: Ignore hidden directories
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Feb 7, 2025
1 parent 6b1596b commit efc2f03
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli/fix/fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ func walk(moduleOrWorkspaceFile string) error {
return err
}
if d.IsDir() {
return nil
// Don't recurse into hidden directories such as .git or .ijwb
// (IntelliJ).
if strings.HasPrefix(d.Name(), ".") {
return filepath.SkipDir
} else {
return nil
}
}
// .bzl files are formatted directly by buildifier.
if strings.HasSuffix(path, ".bzl") {
Expand Down

0 comments on commit efc2f03

Please sign in to comment.