gograph_hotspot
Rank functions by incoming call count (fan-in) to identify the most-depended-on symbols, helping prioritize refactoring and documentation efforts.
Instructions
Rank functions by incoming call count (fan-in) to identify the most-depended-on symbols in the codebase. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. top controls result count (default: 10; 0 = all). Set include_tests=true to count test-file call edges — by default excluded so test helpers don't dominate rankings in test-heavy codebases. WHEN TO USE: When deciding where to invest refactoring effort or documentation — high fan-in functions are the highest-risk change targets. NOT TO USE: For single-package metrics (use gograph_focus or gograph_coupling); for complexity scores (use gograph_complexity). RETURNS: Ranked list of function names with fan-in count and package location.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_tests | No | Include call edges from *_test.go files. Default false — production fan-in only, otherwise test helpers (baseReq, newTestFoo, etc.) tend to dominate rankings in test-heavy codebases. | |
| top | No | Number of results to return (default: 10, 0 = all) |