Skip to content

Commit

Permalink
splice: don't generate files very likely to trigger Boring results
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Mar 9, 2024
1 parent 5475e02 commit bf11de6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/fuzz_tree_splicer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ pub(crate) fn splice_file(path: &PathBuf) -> Vec<String> {
// TODO just return Iterator here
splice(splicer_cfg, &hm)
.map(|f| String::from_utf8(f).unwrap_or_default())
// ignore files that are likely to trigger FPs
.filter(|content| {
!IN_CODE_FP_KEYWORDS
.iter()
.any(|fp_keyword| content.contains(fp_keyword))
})
.collect::<Vec<String>>()
}

Expand Down Expand Up @@ -128,6 +134,12 @@ pub(crate) fn splice_file_from_set(
// TODO tree splicer sometimes just hangs.
splice(splicer_cfg, hmap)
.map(|f| String::from_utf8(f).unwrap_or_default())
// ignore files that are likely to trigger FPs
.filter(|content| {
!IN_CODE_FP_KEYWORDS
.iter()
.any(|fp_keyword| content.contains(fp_keyword))
})
.collect::<Vec<String>>()
}

Expand Down

0 comments on commit bf11de6

Please sign in to comment.