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

Function finding_id

libatomic/src/review/graph.rs:39–54  ·  view source on GitHub ↗
(finding: &ReviewFinding)

Source from the content-addressed store, hash-verified

37}
38
39pub(super) fn finding_id(finding: &ReviewFinding) -> String {
40 let mut finding = finding.clone();
41 finding.acceptance_criteria.clear();
42 finding.locations.sort_by_key(|location| {
43 (
44 location.path.clone(),
45 format!("{:?}", location.side),
46 location.start_line,
47 location.end_line,
48 )
49 });
50 finding
51 .evidence
52 .sort_by_key(|evidence| serde_json::to_string(evidence).unwrap());
53 local_id("finding", &serde_json::to_string(&finding).unwrap())
54}
55
56pub(super) fn membership_hash(repo: &Repository, view: &str) -> CliResult<String> {
57 let membership: Vec<_> = repo

Callers 2

buildFunction · 0.85
compareFunction · 0.85

Calls 4

local_idFunction · 0.70
clearMethod · 0.65
cloneMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected