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

Function finding_line

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

One severity-tagged finding line.

(f: &Finding)

Source from the content-addressed store, hash-verified

145
146/// One severity-tagged finding line.
147fn 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.
158fn 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