Documentation
¶
Overview ¶
Package sarif renders test and coverage results into SARIF 2.1.0 format, which GitHub Advanced Security can ingest and display as code scanning alerts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderCov ¶
RenderCov writes a SARIF 2.1.0 document for coverage results to w.
When threshold > 0, every file whose line coverage is below the threshold is emitted as a SARIF result with level "warning". A threshold of 0 means no threshold is enforced; an empty results array is still produced so that a previous upload's alerts are cleared by GitHub Advanced Security.
toolVersion is embedded in the tool.driver block.
func RenderTest ¶
RenderTest writes a SARIF 2.1.0 document for failed test cases to w. Each failing test case becomes one SARIF result with level "error". Passing and skipped tests are omitted; SARIF alerts are problem-only. toolVersion is embedded in the tool.driver block (pass the build version string).
Types ¶
This section is empty.