MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / project_marker_exists

Function project_marker_exists

src/hooks/mod.rs:435–449  ·  view source on GitHub ↗
(dir: &Path)

Source from the content-addressed store, hash-verified

433}
434
435fn 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
451fn rel_under_root(root: &Path, abs: &Path) -> Option<String> {
452 let stripped = abs.strip_prefix(root).ok()?;

Callers 1

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected