pub fn handle_complexity_command(
path: &Path,
extensions: Option<&[String]>,
exclude: Option<&[String]>,
threshold: Option<u32>,
sort: bool,
) -> Result<(), Box<dyn Error>>Expand description
Handle the complexity command
Analyzes code complexity metrics including cyclomatic and cognitive complexity.
§Arguments
path- The directory to analyzeextensions- Optional file extensions to filter byexclude- Optional directories to excludethreshold- Minimum complexity threshold to report (optional)sort- Whether to sort results by complexity
§Examples
use codesearch::commands::analysis::handle_complexity_command;
use std::path::Path;
handle_complexity_command(Path::new("src"), None, None, Some(10), true).unwrap();