IF Commons GitHub

logical/sarif

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-policy-gate FR-008

The verdict as SARIF 2.1.0 (0002-policy-gate FR-008), so that a CI system or a code host shows each violation where a developer looks: one result for each violation that blocks or warns, at the level error or warning; a waived violation is a result that is suppressed, with the waiver's reason as its justification. The document is a pure function of the verdict.

import { toSarif } from "./sarif.ts";
toSarif({ pass: true, blocking: [], warnings: [], waived: [], unusedWaivers: [], checked: 0 }, "gate").version; // "2.1.0"

Source: commons/gate/src/logical/sarif.ts

1 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

logical.toSariffunctionno test imports it
function toSarif(v: Verdict, tool: string): { readonly version: "2.1.0"; readonly runs: readonly unknown[]; }

The SARIF document of a verdict, tool being the name that runs the gate.

toSariffunction
function toSarif(v: Verdict, tool: string): { readonly version: "2.1.0"; readonly runs: readonly unknown[]; }

The SARIF document of a verdict, tool being the name that runs the gate.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.