mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
fix deduplication issue caused by clobbered findings (#742)
* fix deduplication issue caused by clobbered findings * fix index * remove indexing, slow is better than wrong
This commit is contained in:
1 parent
84e285e4ce
commit
ce42947cae
17 files changed
+81
-66
No files matched your search
+3
-3
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
func TestWriteCSV(t *testing.T) {
|
||||
tests := []struct {
|
||||
findings []*Finding
|
||||
findings []Finding
|
||||
testReportName string
|
||||
expected string
|
||||
wantEmpty bool
|
||||
@@ -17,7 +17,7 @@ func TestWriteCSV(t *testing.T) {
|
||||
{
|
||||
testReportName: "simple",
|
||||
expected: filepath.Join(expectPath, "report", "csv_simple.csv"),
|
||||
findings: []*Finding{
|
||||
findings: []Finding{
|
||||
{
|
||||
RuleID: "test-rule",
|
||||
Match: "line containing secret",
|
||||
@@ -39,7 +39,7 @@ func TestWriteCSV(t *testing.T) {
|
||||
wantEmpty: true,
|
||||
testReportName: "empty",
|
||||
expected: filepath.Join(expectPath, "report", "this_should_not_exist.csv"),
|
||||
findings: []*Finding{}},
|
||||
findings: []Finding{}},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in new issue
Block a user