mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
1 parent
7d9dd260f4
commit
96eed6aa0f
12 files changed
+134
-15
No files matched your search
+3
-1
@@ -21,6 +21,9 @@ func location(fragment Fragment, matchIndex []int) Location {
|
||||
start := matchIndex[0]
|
||||
end := matchIndex[1]
|
||||
|
||||
// default startLineIndex to 0
|
||||
location.startLineIndex = 0
|
||||
|
||||
for lineNum, pair := range fragment.newlineIndices {
|
||||
_lineNum = lineNum
|
||||
newLineByteIndex := pair[0]
|
||||
@@ -48,7 +51,6 @@ func location(fragment Fragment, matchIndex []int) Location {
|
||||
location.endColumn = (end - prevNewLine)
|
||||
location.startLine = _lineNum + 1
|
||||
location.endLine = _lineNum + 1
|
||||
location.startLineIndex = start
|
||||
|
||||
// search for new line byte index
|
||||
i := 0
|
||||
|
||||
Reference in new issue
Block a user