roslyn:get_complexity_metrics
Analyze code complexity with cyclomatic, nesting, LOC, parameters, and cognitive metrics. Specify a file or method for per-method breakdown.
Instructions
Get complexity metrics for a method or entire file.
METRICS: cyclomatic (decision points), nesting (max depth), loc (lines), parameters (count), cognitive (Sonar-style) USAGE: get_complexity_metrics(filePath) for file, or add line/column for specific method OUTPUT: Per-method breakdown with all requested metrics IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | Optional: zero-based line for specific method | |
| column | No | Optional: zero-based column | |
| metrics | No | Optional: specific metrics [cyclomatic, nesting, loc, parameters, cognitive] | |
| filePath | Yes | Absolute path to source file |