Compare commits

..

3 Commits

Author SHA1 Message Date
Dustin Lagoy c86b415965 fix coverage logging 2025-04-07 12:58:19 -07:00
Dustin Lagoy b40aba78e4 fix coverage logging 2025-04-07 12:51:17 -07:00
Dustin Lagoy 623e5de848 limit coverage file search depth 2025-04-07 12:26:13 -07:00
2 changed files with 4 additions and 3 deletions

View File

@ -115,6 +115,7 @@ fn find_coverage_file() -> Option<std::path::PathBuf> {
return Some(std::path::PathBuf::from(coverage_path));
}
for entry in walkdir::WalkDir::new(".")
.max_depth(1)
.into_iter()
.filter_map(|e| e.ok())
{
@ -161,7 +162,7 @@ impl From<RawCoverage> for Coverage {
// so check each in the path
let raw_path: std::path::PathBuf =
[&source.name, &class.filename].iter().collect();
if let Ok(path) = std::fs::canonicalize(raw_path) {
if let Ok(path) = std::fs::canonicalize(raw_path.clone()) {
log::debug!("add file {:?} to coverage", path);
files.insert(
path,
@ -172,7 +173,7 @@ impl From<RawCoverage> for Coverage {
);
break;
}
log::warn!("could not add file {:?} to coverage", path);
log::warn!("could not add file {:?} to coverage", raw_path);
}
}
}

View File

@ -172,7 +172,7 @@ pub fn coverage<'doc>(
);
}
}
log::info!("return empty coverage gutter for {:?}", document_path);
log::info!("return empty coverage gutter");
return Box::new(move |_, _, _, _| None);
}