Skip to content

Commit

Permalink
Make gocloc continue when encountering directory read errors
Browse files Browse the repository at this point in the history
  • Loading branch information
k00l-beanz committed Sep 14, 2022
1 parent 7538a7e commit 989e276
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file added cmd/gocloc/gocloc
Binary file not shown.
3 changes: 2 additions & 1 deletion utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ func getAllFiles(paths []string, languages *DefinedLanguages, opts *ClocOptions)
vcsInRoot := isVCSDir(root)
err = filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
fmt.Printf("%s\n", err)
return nil
}
if ignore := checkDefaultIgnore(path, info, vcsInRoot); ignore {
return nil
Expand Down

0 comments on commit 989e276

Please sign in to comment.