One severity-tagged finding line.
(f: &Finding)
| 145 | |
| 146 | /// One severity-tagged finding line. |
| 147 | fn finding_line(f: &Finding) -> String { |
| 148 | let sev = match f.severity.as_str() { |
| 149 | SEV_BLOCK => crate::output::error("block").to_string(), |
| 150 | SEV_WARN => crate::output::warning("warn").to_string(), |
| 151 | SEV_INFO => info("info").to_string(), |
| 152 | other => other.to_string(), |
| 153 | }; |
| 154 | format!("[{}] {} {}", sev, emphasis(&f.code), f.message) |
| 155 | } |
| 156 | |
| 157 | /// The first line of a possibly multi-line string, for bounded output. |
| 158 | fn first_line(s: &str) -> &str { |