Skip to content

Commit 2cec5ca

Browse files
committed
fix: expose SarifCoverage as reusable type
1 parent 0b7d5f7 commit 2cec5ca

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sarif/sarif_types.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ type SarifDocument struct {
2424
Runs []Run `json:"runs"`
2525
}
2626

27+
type SarifCoverage struct {
28+
Files int `json:"files"`
29+
IsSupported bool `json:"isSupported"`
30+
Lang string `json:"lang"`
31+
}
32+
2733
type SarifResponse struct {
2834
Type string `json:"type"`
2935
Progress float64 `json:"progress"`
@@ -33,12 +39,8 @@ type SarifResponse struct {
3339
Queue int `json:"queue"`
3440
Analysis int `json:"analysis"`
3541
} `json:"timing"`
36-
Coverage []struct {
37-
Files int `json:"files"`
38-
IsSupported bool `json:"isSupported"`
39-
Lang string `json:"lang"`
40-
} `json:"coverage"`
41-
Sarif SarifDocument `json:"sarif"`
42+
Coverage []SarifCoverage `json:"coverage"`
43+
Sarif SarifDocument `json:"sarif"`
4244
}
4345

4446
type region struct {

0 commit comments

Comments
 (0)