Skip to main content

render_report

Function render_report 

Source
pub fn render_report(
    report: &SourceReport,
    display_path: &str,
    content: &str,
    ansi: bool,
) -> String
Expand description

Render a parse report the way the CLI prints it, with source line context.

ansi controls colour. The CLI passes true for terminal output; the report stored in CoreError::Parse is always rendered with false.

Takes the report rather than the parse result so that it also renders reports from metadata-only parses.