Skip to main content

Crate covguard_render

Crate covguard_render 

Source
Expand description

Rendering utilities for covguard reports.

This crate provides renderers that convert a Report into various output formats:

  • Markdown for PR comments
  • GitHub workflow annotation commands
  • SARIF (Static Analysis Results Interchange Format)

§Example

use covguard_render::{render_markdown, render_annotations, render_sarif};
use covguard_types::Report;

let report = Report::default();
let markdown = render_markdown(&report, 10);
let annotations = render_annotations(&report, 25);
let sarif = render_sarif(&report, 1000);

Structs§

SarifArtifactLocation
SARIF artifact location
SarifDriver
SARIF tool driver (main component)
SarifLocation
SARIF location
SarifMessage
SARIF message
SarifPhysicalLocation
SARIF physical location
SarifRegion
SARIF region
SarifReport
SARIF report version 2.1.0
SarifResult
SARIF result (a finding)
SarifRule
SARIF rule definition
SarifRuleConfiguration
SARIF rule configuration
SarifRun
A single SARIF run
SarifTool
SARIF tool information

Constants§

DEFAULT_MAX_ANNOTATIONS
Default maximum number of GitHub annotations to emit.
DEFAULT_MAX_LINES
Default maximum number of lines to show in markdown table.
DEFAULT_MAX_SARIF_RESULTS
Default maximum number of SARIF results to emit.

Functions§

render_annotations
Renders the report as GitHub workflow annotation commands.
render_markdown
Renders the report as a Markdown comment for pull requests.
render_sarif
Renders the report as a SARIF 2.1.0 JSON document.
status_emoji
Returns an emoji representing the verdict status.