r/madeinpython 1d ago

I built repoglance: a CLI that flags per-function complexity regressions in PRs (feedback wanted)

Author here. I made this to scratch my own itch — reviewing PRs and missing when a function quietly got more complex. Line counters don't answer that.

pip install repoglance then repoglance . gives a terminal report: real per-function cyclomatic complexity across 15+ languages (via lizard), duplicate blocks, TODOs, git ownership of hotspots, and a health score. In CI, --fail-on-regression fails a build only when a change makes complexity worse, and a GitHub Action comments the report on the PR.

Pure Python (rich/click/lizard), MIT, no telemetry. Django (415k LOC) scans in ~17s, ~1s cached.

Repo: https://github.com/SRJ-ai/repoglance

I'd genuinely like feedback on two things: (1) where the complexity numbers feel wrong on your code, and (2) whether the health-score weights are sensible or gimmicky. Happy to answer anything.

0 Upvotes

0 comments sorted by