Skip to content

Commit

Permalink
Scorecards returning empty findings
Browse files Browse the repository at this point in the history
Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>
  • Loading branch information
coheigea authored and jeffmendoza committed Jun 13, 2023
1 parent 1ac94c2 commit 1a4ada8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/policies/scorecard/scorecard.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ func listJoin(list []string) string {
func convertLogs(logs []checker.CheckDetail) []string {
var s []string
for _, l := range logs {
s = append(s, fmt.Sprintf("%v[%v]:%v", l.Msg.Path, l.Msg.Offset, l.Msg.Text))
if l.Msg.Finding.Location == nil {
s = append(s, fmt.Sprintf("%v", l.Msg.Finding.Message))
} else {
s = append(s, fmt.Sprintf("%v[%v]:%v", l.Msg.Finding.Location.Value, *l.Msg.Finding.Location.LineStart, l.Msg.Finding.Message))
}
}
return s
}
Expand Down

0 comments on commit 1a4ada8

Please sign in to comment.