| 37 | } |
| 38 | |
| 39 | pub(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 | |
| 56 | pub(super) fn membership_hash(repo: &Repository, view: &str) -> CliResult<String> { |
| 57 | let membership: Vec<_> = repo |