Skip to content

Commit 327b2a0

Browse files
wolfeidauCosmin Cojocar
authored andcommitted
ensure the sarif results are an empty array if nothing is reported
1 parent 41ea431 commit 327b2a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

output/formatter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func convertToSarifReport(rootPaths []string, data *reportInfo) (*sarifReport, e
182182

183183
var rules []*sarifRule
184184
var locations []*sarifLocation
185-
var results []*sarifResult
185+
results := []*sarifResult{}
186186

187187
for index, issue := range data.Issues {
188188
rules = append(rules, buildSarifRule(issue))

0 commit comments

Comments
 (0)