Skip to main content

handle_analyze_command

Function handle_analyze_command 

Source
pub fn handle_analyze_command(
    path: &Path,
    extensions: Option<&[String]>,
    exclude: Option<&[String]>,
    with_metrics: bool,
    format: &str,
) -> Result<(), Box<dyn Error>>
Expand description

Handle the analyze command

Performs comprehensive codebase analysis including file counts, language detection, and code patterns.

§Arguments

  • path - The directory to analyze
  • extensions - Optional file extensions to filter by
  • exclude - Optional directories to exclude
  • with_metrics - Whether to show additional metrics
  • format - Output format (text/json)

§Examples

use codesearch::commands::analysis::handle_analyze_command;
use std::path::Path;

handle_analyze_command(Path::new("src"), None, None, false, "text").unwrap();