Skip to content

Hotspots ​

Multi-language complexity analysis — single binary, zero config, results in seconds.

Hotspots finds the small share of functions responsible for most of a codebase's review burden: the ones combining high structural complexity with recent, frequent change. It scores every function, ranks them, and — in a git repo — layers in churn and touch frequency to separate active risk from dormant debt.

Get started → · CLI reference → · GitHub →

What it does ​

  • LRS scoring — combines cyclomatic complexity, nesting depth, fan-out, and non-structured exits into one actionable number per function.
  • Git-enriched triage — snapshot mode adds churn and touch frequency, placing every function in a fire / debt / watch / ok quadrant. Call-graph metrics (fan-in, PageRank, betweenness) are computed and reported alongside, but don't feed the live score.
  • Policy engine — block PRs that introduce critical-risk functions or regress LRS. Works with GitHub Actions, GitLab CI, and any CI that checks exit codes.

Where to go next ​

Quick StartInstall the binary and run your first analysis.
Usage & WorkflowsSnapshot mode, delta mode, the policy engine, hotspots coordinate.
CLI & Config ReferenceEvery command, every flag, every config field.
ArchitectureHow the analysis pipeline actually works, end to end.
Score Stability & PredictabilityWhat "the score didn't change for no reason" actually means and why it holds.
ContributingDev setup, adding a language, release process.

Live analyses of real open-source repositories run continuously on hotspots.dev — see what this looks like against a codebase you already know.

Released under the MIT License. · hotspots.dev