Skip to content

Commit

Permalink
AST-10757: transform report
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinoantunes1 committed Mar 15, 2022
1 parent 51508ed commit d923a18
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,13 @@ func consumeReports(client rest.Client, exporter export2.Exporter, workerID int,
}
}
// export report
exportErr := exporter.AddFile(fmt.Sprintf(scansFileName, reportJob.ProjectID), reportData)
transformedReportData, transformErr := export2.TransformScanReport(reportData)
if transformErr != nil {
l.Debug().Err(transformErr).Msg("failed transforming report data")
done <- ReportConsumeOutput{Err: transformErr, ProjectID: reportJob.ProjectID, ScanID: reportJob.ScanID}
continue
}
exportErr := exporter.AddFile(fmt.Sprintf(scansFileName, reportJob.ProjectID), transformedReportData)
if exportErr != nil {
l.Debug().Err(exportErr).Msg("failed saving result")
done <- ReportConsumeOutput{Err: exportErr, ProjectID: reportJob.ProjectID, ScanID: reportJob.ScanID}
Expand Down

0 comments on commit d923a18

Please sign in to comment.