Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(report): add required fields to the SARIF template #2341

Merged
merged 13 commits into from
Jun 20, 2022
Prev Previous commit
Next Next commit
update unit tests
  • Loading branch information
afdesk committed Jun 16, 2022
commit 593457fbcbbb0e044b55c64fb26a9fd1e6ff4a6e
21 changes: 18 additions & 3 deletions pkg/report/sarif_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ func TestReportWriter_Sarif(t *testing.T) {
URI: toPtr("test"),
URIBaseId: toPtr("ROOTPATH"),
},
Region: &sarif.Region{StartLine: toPtr(1)},
Region: &sarif.Region{
StartLine: toPtr(1),
EndLine: toPtr(1),
StartColumn: toPtr(1),
EndColumn: toPtr(1),
},
},
},
},
Expand Down Expand Up @@ -148,7 +153,12 @@ func TestReportWriter_Sarif(t *testing.T) {
URI: toPtr("test"),
URIBaseId: toPtr("ROOTPATH"),
},
Region: &sarif.Region{StartLine: toPtr(1)},
Region: &sarif.Region{
StartLine: toPtr(1),
EndLine: toPtr(1),
StartColumn: toPtr(1),
EndColumn: toPtr(1),
},
},
},
},
Expand All @@ -165,7 +175,12 @@ func TestReportWriter_Sarif(t *testing.T) {
URI: toPtr("test"),
URIBaseId: toPtr("ROOTPATH"),
},
Region: &sarif.Region{StartLine: toPtr(1)},
Region: &sarif.Region{
StartLine: toPtr(1),
EndLine: toPtr(1),
StartColumn: toPtr(1),
EndColumn: toPtr(1),
},
},
},
},
Expand Down