Skip to content

Commit

Permalink
fix: expose SarifCoverage as reusable type (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts committed May 27, 2024
2 parents 0b7d5f7 + 2cec5ca commit 4d354c0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions sarif/sarif_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ type SarifDocument struct {
Runs []Run `json:"runs"`
}

type SarifCoverage struct {
Files int `json:"files"`
IsSupported bool `json:"isSupported"`
Lang string `json:"lang"`
}

type SarifResponse struct {
Type string `json:"type"`
Progress float64 `json:"progress"`
Expand All @@ -33,12 +39,8 @@ type SarifResponse struct {
Queue int `json:"queue"`
Analysis int `json:"analysis"`
} `json:"timing"`
Coverage []struct {
Files int `json:"files"`
IsSupported bool `json:"isSupported"`
Lang string `json:"lang"`
} `json:"coverage"`
Sarif SarifDocument `json:"sarif"`
Coverage []SarifCoverage `json:"coverage"`
Sarif SarifDocument `json:"sarif"`
}

type region struct {
Expand Down

0 comments on commit 4d354c0

Please sign in to comment.