Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions sarif/sarif_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
//nolint:revive,tagliatelle // These are all SARIF documented types that need to match the exact JSON format.
package sarif

// SarifResponse matches the spec in https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/schemas/sarif-schema-2.1.0.json
// SarifDocument matches the spec in https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/schemas/sarif-schema-2.1.0.json
type SarifDocument struct {
Schema string `json:"$schema"`
Version string `json:"version"`
Runs []Run `json:"runs"`
}

type SarifResponse struct {
Type string `json:"type"`
Progress float64 `json:"progress"`
Expand All @@ -32,11 +38,7 @@ type SarifResponse struct {
IsSupported bool `json:"isSupported"`
Lang string `json:"lang"`
} `json:"coverage"`
Sarif struct {
Schema string `json:"$schema"`
Version string `json:"version"`
Runs []Run `json:"runs"`
} `json:"sarif"`
Sarif SarifDocument `json:"sarif"`
}

type region struct {
Expand Down