1
0
mirror of https://github.com/securego/gosec.git synced 2025-03-21 21:17:32 +02:00

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))