Skip to content
hotspot

polyglot · 17 languages · churn × complexity × coupling

Find the code worth refactoring first.

Complex code that never changes is dormant. Churny code that's trivial is cheap. The code that hurts is both — high complexity and high churn. hotspot multiplies the two into one ranked list, in any language, so you fix what actually costs you.

↑ Click a language — 17 supported, one ranked score. MIT · single static binary, no cgo · composes gitmeta + codemetrics + go-coupling + treesitter-symbols

hotspot — python

      

how it works

One score, composed from single-purpose tools.

hotspot doesn't re-implement git or a parser — it fuses libraries that each do one thing well, normalizes every signal to 0–1 (log-scaled, so one giant file can't flatten the rest), multiplies churn by complexity, then lets coupling amplify.

// base = norm(churn) × norm(complexity)
// coupling amplifies; renormalized so top = 1.0
score := base * (1 + couplingNorm)
# library, not just a CLI
rep, _ := hotspot.Analyze(ctx, ".", hotspot.Options{})
for _, f := range rep.Files[:10] {
    fmt.Println(f.Score, f.Path)
}

what you get

A prioritized refactoring list, not another linter.

Ranked, not flagged

Every file gets a 0–1 risk score and a stable ranking — triage the top of the list instead of drowning in per-rule warnings.

Zero config

Point it at a repo. It walks tracked source, skips vendor/build dirs, and degrades to a pure complexity ranking outside a git tree.

Table or JSON

A readable table for humans, structured JSON (score, norms, author, commits) for dashboards, bots, and CI gates.

Pure Go, no cgo

A single static binary. The Go complexity path uses go/ast; churn shells out to your git. Nothing to install but the tool.

Library-first

hotspot.Analyze returns the full report; the scorer is pure and exported. Signals sit behind small interfaces, so new dimensions drop in cleanly.

Explainable

Each score shows its parts — commits, cognitive, cyclomatic, functions — so a hotspot is a conversation starter, not a black box.

install

Install it, point it at any repo.

brew brew install --cask richardwooding/tap/hotspot
go go install github.com/richardwooding/hotspot/cmd/hotspot@latest
run hotspot -top 20 /path/to/repo
import import "github.com/richardwooding/hotspot"

Needs a git binary on PATH for churn. Complexity spans 17 languages and coupling spans 13 ecosystems — a single static binary, no cgo. Or grab a prebuilt binary for macOS, Linux or Windows from the releases page.

roadmap

More signals, same one score.

Each dimension already has a home in the portfolio and slots in behind the existing interfaces — the score just gets sharper.

  • call-graph centrality → treesitter-symbols
  • SARIF output → go-sarif
  • MCP server (ask Claude for hotspots)