Skip to main content

detect_stack

Function detect_stack 

Source
pub fn detect_stack(repo_path: &str) -> ProjectStack
Expand description

Identifies the project stack in repo_path.

§Arguments

  • repo_path — an absolute or relative path to the repository root.

§Returns

The primary ProjectStack. Returns Unknown (with a warning) when no recognized marker file exists.

use limitless_cli::models::ProjectStack;
use limitless_cli::modules::stack_detector::detect_stack;

// This crate's own directory IS a Rust project.
let stack = detect_stack(env!("CARGO_MANIFEST_DIR"));
assert!(matches!(stack, ProjectStack::Rust { .. }));