SARIF - GCC Wiki (original) (raw)

SARIF support in GCC

The Static Analysis Results Interchange Format (SARIF) is "an industry standard format for the output of static analysis tools" i.e. a machine-readable file format that can represent compiler diagnostics.

GCC's statement of use in the SARIF specification's issue tracker can be seen here

GCC as a SARIF producer

GCC 13 onwards can output its diagnostics in SARIF format.

GCC 15 onwards can output its diagnostics in multiple formats at once (such as text *and* SARIF).

User-facing documentation:

Implementation: gcc/diagnostic-format-sarif.cc

History of GCC as a SARIF producer

GCC 16 (under development)

GCC 15

GCC 14

GCC 13

GCC as a SARIF consumer

As of GCC 15, GCC optionally provides a sarif-replay tool that accepts SARIF as input. See libgdiagnostics for more information.

History of GCC as a SARIF consumer

Bugs relating to GCC SARIF support

There is a "SARIF" keyword in GCC's bug tracker for bugs relating to GCC's SARIF support.

By keyword:

By text:

Bugs relating to sarif-replay: