pub fn validate_root(root: &Path) -> Result<PathBuf, String>Expand description
Project-root validation that the CLI uses for --root, for a surface that
takes its root from a client, such as the language server.
Canonicalize a project root and require it to be an existing directory.
The root must not pass through a link that moves it out of its checkout.
Without this check, a committed link could point the root at a directory
outside the repository, and the analysis would then use that directory
as the project. The private check_root_links holds the rules.
A relative root starts at the current directory of the process. See
validate_root_in for the check of its PWD spelling.
ยงErrors
Returns a message when the path cannot be canonicalized, is not a directory, or passes through such a link.