SARIF support

SARIF is a machine-readable format, originally designed for the output of static analysis tools, but which can be used for diagnostics in general.

void diagnostic_manager_add_sarif_sink(diagnostic_manager *diag_mgr, FILE *dst_stream, const diagnostic_file *main_input_file, enum diagnostic_sarif_version version)

Add a new output sink to diag_mgr, which writes SARIF of the given version to dst_stream.

The output is not written until diag_mgr is released.

dst_stream is borrowed, and must outlive diag_mgr.

For the result to be a valid SARIF file according to the schema, diag_mgr must have had diagnostic_manager_set_tool_name() called on it.

diag_mgr, dst_stream, and main_input_file must all be non-NULL.

enum diagnostic_sarif_version

An enum for choosing the SARIF version for a SARIF output sink.

DIAGNOSTIC_SARIF_VERSION_2_1_0
DIAGNOSTIC_SARIF_VERSION_2_2_PRERELEASE