class

Ignorelint::SarifFormatter

Inherits Ignorelint::Formatter < Reference < Object

Instance methods

finish(io : IO) : Nil

Write the complete SARIF 2.1.0 JSON document to the output stream.

The document has two main sections:

  1. rules: deduplicated list of all rule IDs encountered, each with a short description derived from the diagnostic code name.

  2. results: every issue with its location (file URI + line number), severity level, rule ID, and message.

Fixed issues map to level "note"; no non-standard kind is emitted.

format_file(result : FileResult, io : IO) : Nil

Collect the file result for later emission in finish.

start(io : IO) : Nil

No-op — the SARIF document is written in finish.