The output selection, shared by the routed and the local body: attest > html > json > walkthrough > CLI dashboard.
(
review: &TriageReview,
report: &atomic_repository::triage::TriageReport,
)
| 351 | /// The output selection, shared by the routed and the local body: attest > |
| 352 | /// html > json > walkthrough > CLI dashboard. |
| 353 | fn render_report( |
| 354 | review: &TriageReview, |
| 355 | report: &atomic_repository::triage::TriageReport, |
| 356 | ) -> CliResult<()> { |
| 357 | if review.attest { |
| 358 | let signed = output::attest_report(report, review.identity.as_deref())?; |
| 359 | println!("{}", serde_json::to_string_pretty(&signed).unwrap()); |
| 360 | } else if review.html { |
| 361 | let html = output::render_html(report); |
| 362 | write_and_open_html(&html, report, review.output.as_deref(), !review.no_open)?; |
| 363 | } else if review.json { |
| 364 | println!("{}", serde_json::to_string_pretty(report).unwrap()); |
| 365 | } else if review.walkthrough { |
| 366 | output::print_walkthrough(report); |
| 367 | } else { |
| 368 | output::print_report(report); |
| 369 | } |
| 370 | |
| 371 | Ok(()) |
| 372 | } |
| 373 | |
| 374 | /// Resolve the `(source, target)` view pair a triage run operates on. |
| 375 | /// |
no test coverage detected