Skip to content

Commit

Permalink
Update Issue Description for containerless
Browse files Browse the repository at this point in the history
Adding updated static-report change populating Issue description field with
Message to container-less analysis.

Related to: konveyor/static-report#130

Signed-off-by: Marek Aufart <[email protected]>
  • Loading branch information
aufi committed Dec 4, 2024
1 parent 95873c1 commit a8b57c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/static-report.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,17 @@ func loadApplications(apps []*Application) error {
// we don't need them in the report, ignore them
for idx := range app.Rulesets {
rs := &app.Rulesets[idx]
for _, violation := range rs.Violations {
for mapKey, violation := range rs.Violations {
violation.Extras = nil
for idx := range violation.Incidents {
inc := &violation.Incidents[idx]
inc.Variables = make(map[string]interface{})
// Propagate more detailed description to the Violation/display in UI
if idx == 0 {
violation.Description = fmt.Sprintf("%s\n\n%s", violation.Description, inc.Message)
}
}
rs.Violations[mapKey] = violation
}
}
}
Expand Down

0 comments on commit a8b57c9

Please sign in to comment.