object

# `sarif`

Shared SARIF report generator for tools implementing the diagnostics protocol.

Availability:
`logtalk_load(sarif(loader))`
Author: Paulo Moura
Version: 1:0:0
Date: 2026-04-01
Compilation flags:
`static, context_switching_calls`
Uses:
git
json(ObjectRepresentation,PairRepresentation,StringRepresentation)
list
logtalk
os
reader
term_io
type
url(Representation)
user
uuid
Remarks:
(none)
Inherited public predicates:
(none)

## Public predicates

### `term/2`

Returns a SARIF 2.1.0 report term for the given list of diagnostics tool specifications. Each specification must be a `tool_spec(Tool, Target, Options)` term.

Compilation flags:
`static`
Template:
`term(Specs,Term)`
Mode and number of proofs:
`term(+list(compound),-compound)` - `one`

### `term/4`

Returns a SARIF 2.1.0 report term for a diagnostics tool target using the given options.

Compilation flags:
`static`
Template:
`term(Tool,Target,Term,Options)`
Mode and number of proofs:
`term(+object_identifier,+nonvar,-compound,+list(compound))` - `one`

### `generate/2`

Generates a SARIF 2.1.0 report for the given list of diagnostics tool specifications and sink accepted by the json library. Each specification must be a `tool_spec(Tool, Target, Options)` term.

Compilation flags:
`static`
Template:
`generate(Specs,Sink)`
Mode and number of proofs:
`generate(+list(compound),++compound)` - `one`

### `generate/4`

Generates a SARIF 2.1.0 report for a diagnostics tool target using the given options and sink accepted by the json library.

Compilation flags:
`static`
Template:
`generate(Tool,Target,Sink,Options)`
Mode and number of proofs:
`generate(+object_identifier,+nonvar,++compound,+list(compound))` - `one`

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)