Skip to content

hotspots

spanical hotspots is where the risk story condenses: files that keep changing and carry complexity at the same time. Every changed file past the eligibility rule qualifies; the score is the product of the two axes, so a stable complex file and a constantly churned trivial file sink toward the bottom of the ranking rather than being excluded.

bash
spanical hotspots [flags]

Options

OptionValuesNotes
All global flagsSee global flags; --by has no effect here

Behavior

A file is eligible when it is non-binary, non-migration, holds at least hotspot.minFileLines code lines in its window-end scc snapshot, and changed at least once in the window.

Columns: Path (repo/path), Change freq (distinct no-merge commits touching the file in-window), Complexity (window-end scc cyclomatic complexity), Score, number of owners. Rows sort by score descending.

Scores are min-max normalized within a single run, so they are relative rankings, not absolute ratings. A 0.000 means "least significant on both axes among today's list", not "no risk". Compare lists across windows with care.

The empty-window message matches report's:

shell
No hotspots: no eligible non-binary, non-migration file both changed in the selected window and had at least 50 code lines in its window-end SCC snapshot.

Examples

shell
$ spanical hotspots
┌───────────────────────────────┬─────────────┬────────────┬───────┬─────────┐
│ Path                          │ Change freq │ Complexity │ Score │ #Owners │
├───────────────────────────────┼─────────────┼────────────┼───────┼─────────┤
│ repo-alpha/src/core/engine.ts │           3 │          0 │ 0.000 │       3 │
└───────────────────────────────┴─────────────┴────────────┴───────┴─────────┘

(One eligible file normalizes to zero on both axes, hence 0.000.)

JSON rows include the normalization intermediates:

json
{
    "repo": "repo-alpha",
    "path": "src/core/engine.ts",
    "changeFrequency": 3,
    "complexity": 0,
    "freqNorm": 0,
    "cxNorm": 0,
    "score": 0,
    "ownerCount": 3
}