One severity-tagged finding line.
(f: &Finding)
| 255 | |
| 256 | /// One severity-tagged finding line. |
| 257 | fn finding_line(f: &Finding) -> String { |
| 258 | let sev = match f.severity.as_str() { |
| 259 | SEV_BLOCK => crate::output::error("block").to_string(), |
| 260 | SEV_WARN => crate::output::warning("warn").to_string(), |
| 261 | SEV_INFO => info("info").to_string(), |
| 262 | other => other.to_string(), |
| 263 | }; |
| 264 | format!("[{}] {} {}", sev, emphasis(&f.code), f.message) |
| 265 | } |
| 266 | |
| 267 | /// The first line of a possibly multi-line string, for bounded output. |
| 268 | fn first_line(s: &str) -> &str { |