Skip to main content

Module stale_code

Module stale_code 

Expand description

stale-code analysis.

Surfaces files that are alive at HEAD but haven’t been touched in N+ months AND carry low cognitive complexity — the signature of code that’s likely unused / abandoned but hasn’t been deleted. Defaults: 12 months untouched + cognitive ≤ 5 (functions / constants / boilerplate). The intersection minimises false positives: critical low-complexity code (config / constants) that was recently TOUCHED stays in the codebase; the surfacing list is files that are BOTH small AND forgotten.

Output is sorted by months-since-touch DESC so the worst offenders sit at the top.

Structs§

StaleCodeRow

Functions§

run_stale_code
Run the stale-code analysis. Returns rows ranked by months- since-touch (highest first).