MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / finding_line

Function finding_line

atomic-cli/src/commands/triage/output.rs:257–265  ·  view source on GitHub ↗

One severity-tagged finding line.

(f: &Finding)

Source from the content-addressed store, hash-verified

255
256/// One severity-tagged finding line.
257fn 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.
268fn first_line(s: &str) -> &str {

Callers

nothing calls this directly

Calls 4

errorFunction · 0.85
warningFunction · 0.85
infoFunction · 0.85
as_strMethod · 0.45

Tested by

no test coverage detected