Analyze codebase for size, complexity, and quality metrics
Find all files matching include patterns
Exclude directories from exclude list
Build file list for analysis
For each file, count total, code, blank, comment lines
Aggregate totals by file type
Parse functions/methods in each file
Calculate cyclomatic complexity per function
Identify deeply nested code blocks
Detect duplicate code blocks
Find long functions (> 50 lines)
Find large files (> 500 lines)
Count TODO/FIXME comments
Format metrics according to output parameter
Include recommendations for concerning metrics