Skip to main content

run_check

Function run_check 

Source
pub async fn run_check(
    range: &str,
    guidelines_path: Option<&Path>,
    repo_path: Option<&Path>,
    strict: bool,
    model: Option<String>,
) -> Result<CheckOutcome>
Expand description

Non-interactive core for omni-dev git commit message check.

Shared by the CLI (which prints the report and uses the exit code) and the MCP server (which returns the structured outcome to the caller). Always runs a single direct AI call — the MCP tool boundary never needs the map-reduce/interactive-retry flow from CheckCommand::execute.

repo_path selects the repository to check (None defaults to the current working directory). It is resolved once here and threaded explicitly into [run_check_with_client], so context-discovery and AI-scratch paths anchor to the target repo without changing the process working directory.