This commit is contained in:
Zachary Rice authored and GitHub committed 2024-12-20 05:46:25 -06:00
1 parent a9e6d8c9a7
commit 8a8306288e
3 files changed
+52 -2

No files matched your search

+2 -1
View File
@@ -110,11 +110,12 @@ func (d *Detector) DetectFiles(paths <-chan sources.ScanTarget) ([]report.Findin
}
// Count the number of newlines in this chunk
chunk := string(peekBuf.Bytes())
chunk := peekBuf.String()
linesInChunk := strings.Count(chunk, "\n")
totalLines += linesInChunk
fragment := Fragment{
Raw: chunk,
Bytes: peekBuf.Bytes(),
FilePath: pa.Path,
}
if pa.Symlink != "" {