mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
fix off by one line number for --no-git
This commit is contained in:
1 parent
ce42947cae
commit
6f6ebd454f
3 files changed
+14
-4
No files matched your search
@@ -51,6 +51,10 @@ func FromFiles(source string, cfg config.Config, outputOptions Options) ([]repor
|
||||
}
|
||||
fis := DetectFindings(cfg, b, p, "")
|
||||
for _, fi := range fis {
|
||||
// need to add 1 since line counting starts at 1
|
||||
fi.StartLine++
|
||||
fi.EndLine++
|
||||
|
||||
if outputOptions.Redact {
|
||||
fi.Redact()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user