(dir: &Path)
| 433 | } |
| 434 | |
| 435 | fn project_marker_exists(dir: &Path) -> bool { |
| 436 | const MARKERS: &[&str] = &[ |
| 437 | ".git", |
| 438 | "Cargo.toml", |
| 439 | "package.json", |
| 440 | "pyproject.toml", |
| 441 | "go.mod", |
| 442 | "pom.xml", |
| 443 | "build.gradle", |
| 444 | "build.gradle.kts", |
| 445 | "deno.json", |
| 446 | "tsconfig.json", |
| 447 | ]; |
| 448 | MARKERS.iter().any(|marker| dir.join(marker).exists()) |
| 449 | } |
| 450 | |
| 451 | fn rel_under_root(root: &Path, abs: &Path) -> Option<String> { |
| 452 | let stripped = abs.strip_prefix(root).ok()?; |
no test coverage detected