ignore empty files (#965)

This commit is contained in:
Zachary Rice authored and GitHub committed 2022-08-26 09:48:33 -05:00
1 parent adf512e2ac
commit e47867d802
1 file changed
+3
+3
View File
@@ -363,6 +363,9 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
if fInfo.Name() == ".git" && fInfo.IsDir() {
return filepath.SkipDir
}
if fInfo.Size() == 0 {
return nil
}
if fInfo.Mode().IsRegular() {
paths <- path
}