pub fn write_sarif<W: Write>(
offenders: &[OffenderRecord],
writer: W,
) -> Result<()>Expand description
Write a SARIF 2.1.0 document for offenders to writer.
Offenders whose path is not valid UTF-8 are skipped with a warning
to stderr (SARIF artifactLocation.uri requires a UTF-8 string).
The empty case emits a well-formed run with empty results: [] and
rules: [] so snapshots are stable and CI consumers can already
integrate before the threshold engine (#96) lands.
ยงErrors
Returns any io::Error produced by writer while emitting the
SARIF JSON document, or a serde_json::Error (mapped to io::Error
via io::Error::other) if a record cannot be serialised.