Add MAR to dups, Remove Path Prefix (#1621)

Adds `boss/mar` to the list of paths evaluated by the duplicate finder.

Removes the `../../` prefix for matching ASM files in the final report.
This commit is contained in:
Jonathan Hohle 2024-09-16 16:08:52 -07:00 committed by GitHub
parent 4d9839a0e2
commit 7689f776dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -209,6 +209,13 @@ fn do_dups_report(output_file: Option<String>, threshold: f64) {
let mut files = Vec::new();
let pairs: Vec<SrcAsmPair> = vec![
SrcAsmPair {
asm_dir: String::from("../../asm/us/boss/mar/nonmatchings/"),
src_dir: String::from("../../src/boss/mar/"),
overlay_name: String::from("MAR"),
include_asm: get_all_include_asm("../../src/boss/mar/"),
path_matcher: "/mar/".to_string(),
},
SrcAsmPair {
asm_dir: String::from("../../asm/us/dra/nonmatchings/"),
src_dir: String::from("../../src/dra/"),
@ -402,7 +409,7 @@ fn do_dups_report(output_file: Option<String>, threshold: f64) {
writeln!(
output_file,
"| {:<4.2} | {:<8} | {:<35} | {:<2} ",
function.similarity, decompiled, function.name, function.file
function.similarity, decompiled, function.name, function.file.strip_prefix("../../").unwrap()
)
.expect("Error writing to file");
}