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

Function subject_label

libatomic/src/review/presentation.rs:188–201  ·  view source on GitHub ↗
(subject: &str)

Source from the content-addressed store, hash-verified

186}
187
188pub(super) fn subject_label(subject: &str) -> &str {
189 let Some((_, local)) = subject.split_once('#') else {
190 return subject;
191 };
192 let local = local
193 .strip_prefix("function:")
194 .or_else(|| local.strip_prefix("class:"))
195 .unwrap_or(local);
196 local
197 .rsplit_once(':')
198 .filter(|(_, ordinal)| !ordinal.is_empty() && ordinal.chars().all(|c| c.is_ascii_digit()))
199 .map(|(name, _)| name)
200 .unwrap_or(local)
201}
202
203pub(super) fn metric_id(node: &GraphNode) -> String {
204 serde_json::from_value::<atomic_audit::Metric>(node.properties["observation"]["metric"].clone())

Callers 1

regionsFunction · 0.70

Calls 2

is_emptyMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected