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§
- Sarif
Artifact Location - SARIF artifact location
- Sarif
Driver - SARIF tool driver (main component)
- Sarif
Location - SARIF location
- Sarif
Message - SARIF message
- Sarif
Physical Location - SARIF physical location
- Sarif
Region - SARIF region
- Sarif
Report - SARIF report version 2.1.0
- Sarif
Result - SARIF result (a finding)
- Sarif
Rule - SARIF rule definition
- Sarif
Rule Configuration - SARIF rule configuration
- Sarif
Run - A single SARIF run
- Sarif
Tool - 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.