ensure the sarif results are an empty array if nothing is reported

This commit is contained in:
Mark Wolfe 2021-01-21 20:21:59 +11:00 committed by Cosmin Cojocar
parent 41ea431779
commit 327b2a0841

View file

@ -182,7 +182,7 @@ func convertToSarifReport(rootPaths []string, data *reportInfo) (*sarifReport, e
var rules []*sarifRule
var locations []*sarifLocation
var results []*sarifResult
results := []*sarifResult{}
for index, issue := range data.Issues {
rules = append(rules, buildSarifRule(issue))