Skip to main content

discover_project_root_from

Function discover_project_root_from 

Source
pub fn discover_project_root_from(start_dir: &Path) -> PathBuf
Expand description

Discover the project root by walking up from start_dir.

Returns the directory containing the first project marker (.git, .rumdl.toml, pyproject.toml, or .markdownlint.json) found while traversing parent directories. Falls back to start_dir itself when no marker is found.

The result is canonicalized to resolve symlinks; if canonicalization fails (e.g. because the path no longer exists), the un-canonicalized path is returned instead.