Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
include all occurrences
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpivkin committed Jul 14, 2023
1 parent aa18860 commit 625d845
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/scan/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,19 +348,13 @@ func (r *Result) Occurrences() []Occurrence {
var occurrences []Occurrence

mod := &r.metadata
prevFileName := mod.Range().GetFilename()

for {
mod = mod.Parent()
if mod == nil {
break
}
parentRange := mod.Range()
fileName := parentRange.GetFilename()
if fileName == prevFileName {
continue
}
prevFileName = fileName
occurrences = append(occurrences, Occurrence{
Resource: mod.Reference(),
Filename: parentRange.GetFilename(),
Expand Down

0 comments on commit 625d845

Please sign in to comment.