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

Function comparison_state

libatomic/src/review/impact.rs:180–187  ·  view source on GitHub ↗
(issue: &atomic_audit::impact::ContractIssue)

Source from the content-addressed store, hash-verified

178}
179
180pub(super) fn comparison_state(issue: &atomic_audit::impact::ContractIssue) -> FindingComparison {
181 FindingComparison {
182 status: if issue.introduced { "new" } else { "unknown" }.into(),
183 before: issue.before_declaration.iter().map(|location|Location {path:location.path.clone(),side:SourceSide::Before,start_line:location.start_line,end_line:location.end_line}).collect(),
184 after: vec![Location {path:issue.call.location.path.clone(),side:SourceSide::After,start_line:issue.call.location.start_line,end_line:issue.call.location.end_line}],
185 rationale:"Static call-contract evidence between the two pinned view states; not introduction by one authored change or whole-program proof.".into(),
186 }
187}
188
189pub(super) fn project(graph: &mut ReviewGraph, reports: &[ImpactReport]) {
190 let mut present: BTreeSet<_> = graph.nodes.iter().map(|node| node.id.clone()).collect();

Callers 1

buildFunction · 0.85

Calls 3

collectMethod · 0.45
iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected