Skip to content

Hotspots

Find where your engineering attention has the highest expected value.

Most of the pain in a codebase comes from a small fraction of it — the same files that generate the most incidents, the slowest reviews, and the hardest bugs to track down. Hotspots finds that fraction before it costs you.

bash
hotspots analyze src/

LRS   File                      Line  Function
12.4  src/api/billing.ts         142  processPlanUpgrade   critical
 9.8  src/auth/session.ts         67  validateSession      high
 3.2  src/utils/format.ts         12  formatDate           low

Each result is ranked by Local Risk Score (LRS) — a weighted combination of cyclomatic complexity, nesting depth, fan-out, and exit paths. High LRS means the function is structurally hard to reason about, test, and safely change.


Get Started


What it gives you

An objective refactor list. Stop debating what to clean up. The highest-LRS functions in your codebase are the ones most likely to slow your next feature and hide your next bug.

CI enforcement. Block new critical-complexity functions before they merge. Delta mode shows exactly which functions got worse in a PR — and by how much.

Progress you can show. "We dropped from 31 critical functions to 18 this quarter" is a concrete metric. Hotspots makes that trackable without extra tooling.

Everything stays local. Analysis runs on your machine. No source code leaves, no account required, no data sent anywhere.


Supported Languages

TypeScript · JavaScript · Go · Python · Rust · Java · C

All languages produce the same metrics with consistent semantics. See Language Support.


Where this is going

Risk hotspots — structurally complex, frequently changed code — are the first category. Several more are in active research:

  • Review Hotspots — changes that need senior eyes, not rubber stamps
  • Test Hotspots — coverage gaps where CI misses real failures
  • Ownership Hotspots — knowledge silos and review bottlenecks
  • Impact Hotspots — code with outsized blast radius (auth, billing, schema contracts)

The goal is a continuous picture of where your engineering attention matters most — before something ships, not after it pages you.


For Contributors

Start with the Codebase Guide for the implementation map, then the Contributing Guide for dev workflow.

Released under the MIT License. · hotspots.dev