skip files we can't scan (#2170)

This commit is contained in:
ahrav
2023-12-04 13:37:11 -08:00
committed by GitHub
parent dbfd9a7092
commit 13da76d357
+5
View File
@@ -976,6 +976,11 @@ func handleBinary(ctx context.Context, repo *git.Repository, reporter sources.Ch
return err
}
if common.SkipFile(file.Name) {
ctx.Logger().V(5).Info("skipping binary file", "path", path, "file_name", file.Name)
return nil
}
fileReader, err := file.Reader()
if err != nil {
return err