-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/sarif: use empty arrays instead of nils
Sarif specification requires that some slice elements explicitly exist in the JSON output even if they are empty. For instance, results should be an empty array if the sarif handler finished but found nothing. Another example is tags. Each rule in govulncheck sarif has tags property that can sometimes be empty. If so, JSON should contain an empty slice of tags. Fixes golang/go#70157 Change-Id: I112181e4efa5bc0a1577ff98f1b9eab912ed814c Reviewed-on: https://go-review.googlesource.com/c/vuln/+/625656 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Maceo Thompson <maceothompson@google.com>
- Loading branch information
1 parent
47cd072
commit dba032f
Showing
4 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters