fixing a location off by one edge case for --no-git (#812)

This commit is contained in:
Zachary Rice authored and GitHub committed 2022-03-22 14:22:46 -05:00
1 parent 31ff8677dd
commit ba9e089e35
2 files changed
+10 -11

No files matched your search

+8 -8
View File
@@ -84,8 +84,8 @@ func TestDetect(t *testing.T) {
File: "tmp.go",
RuleID: "pypi-upload-token",
Tags: []string{"key", "pypi"},
StartLine: 0,
EndLine: 0,
StartLine: 1,
EndLine: 1,
StartColumn: 1,
EndColumn: 86,
Entropy: 1.9606875,
@@ -106,8 +106,8 @@ func TestDetect(t *testing.T) {
File: "tmp.go",
RuleID: "aws-access-key",
Tags: []string{"key", "AWS"},
StartLine: 0,
EndLine: 0,
StartLine: 1,
EndLine: 1,
StartColumn: 15,
EndColumn: 34,
Entropy: 3.0841837,
@@ -154,8 +154,8 @@ func TestDetect(t *testing.T) {
RuleID: "discord-api-key",
Tags: []string{},
Entropy: 3.7906237,
StartLine: 0,
EndLine: 0,
StartLine: 1,
EndLine: 1,
StartColumn: 7,
EndColumn: 93,
},
@@ -184,8 +184,8 @@ func TestDetect(t *testing.T) {
RuleID: "generic-api-key",
Tags: []string{},
Entropy: 3.7906237,
StartLine: 0,
EndLine: 0,
StartLine: 1,
EndLine: 1,
StartColumn: 22,
EndColumn: 93,
},