complexity_analysis
Analyze code complexity to identify code smells and prioritize refactoring opportunities.
Instructions
š Analyze code complexity and identify refactoring opportunities.
šÆ PURPOSE: Calculates cyclomatic complexity, identifies code smells, and suggests specific refactoring opportunities with priority rankings. š§ USAGE: Use after basic analysis to identify problematic code areas that need attention. Essential for code quality assessment. ā” PERFORMANCE: Moderate operation (5-15s) - analyzes complexity metrics across the entire codebase. š WORKFLOW: analyze_codebase ā complexity_analysis ā examine high-complexity functions ā find_callers/find_callees for refactoring impact. š” TIP: Start with threshold=15 for critical issues, lower to 10 for comprehensive analysis. Focus on functions with complexity >20 first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| threshold | No | Minimum complexity threshold to report (10=comprehensive, 15=critical issues only, 20=severe problems) |