gograph_complexity
Analyze cyclomatic complexity of Go functions, sorted highest to lowest, with severity labels; filter by symbol name for targeted code quality checks.
Instructions
Report estimated cyclomatic complexity for Go functions, sorted highest-to-lowest with severity labels (LOW/MEDIUM/HIGH/VERY HIGH). Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Optional symbol substring filters to a specific function or set of functions. WHEN TO USE: During code quality audits, identifying functions that need decomposition, or setting complexity budgets in CI. NOT TO USE: For import dependency metrics (use gograph_coupling or gograph_deps); for God Object detection (use gograph_godobj). RETURNS: Structured list of functions with complexity score and severity label; empty when no functions match the filter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | Optional Go function or method symbol name substring to filter the complexity report (e.g., 'Build') |