Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Oct 3, 2023
1 parent 2aed015 commit 306e9f3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions xray/utils/resultwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,17 +311,12 @@ func getDescriptorFullPath(tech coreutils.Technology, run *sarif.Run) (string, e
}

// Get the descriptor location with the Xray issues if exists.
// If location not exists and markdown provided, will return a string with: "<formal_tech_name> Package Descriptor" else nil
func getXrayIssueLocationIfValidExists(tech coreutils.Technology, run *sarif.Run) (location *sarif.Location, err error) {
descriptorPath, err := getDescriptorFullPath(tech, run)
if err != nil {
return
}
if strings.TrimSpace(descriptorPath) == "" {
// Can't calculate actual file location
// if markdown {
// return sarif.NewLocation().WithPhysicalLocation(sarif.NewPhysicalLocation().WithArtifactLocation(sarif.NewArtifactLocation().WithUri(tech.ToFormal() + " Package Descriptor"))), nil
// }
return
}
return sarif.NewLocation().WithPhysicalLocation(sarif.NewPhysicalLocation().WithArtifactLocation(sarif.NewArtifactLocation().WithUri("file://" + descriptorPath))), nil
Expand Down

0 comments on commit 306e9f3

Please sign in to comment.