On Tue, Oct 5, 2021 at 3:44 PM Kushal Kumaran <kus...@locationd.net> wrote:
>
> On Sat, Oct 02 2021 at 09:05:47 PM, Dan Stromberg <drsali...@gmail.com> wrote:
> > Hi folks.
> >
> > Is there a way of getting the McCabe Complexity of just the functions and
> > methods (in Python) changed in a git commit?
> >
> > I found radon, and it looks good.  But I think it wants to do entire files,
> > no?
> >
>
> Calculate your metric for this commit, calculate metric for parent
> commit, and take the difference?  That's how we do coverage metrics to
> report stuff like "change increases/decreases coverage by N%".
>

What if it has multiple parents, like a merge commit that resolves conflicts?

(A merge that doesn't make any other changes won't affect coverage or
complexity, since it's all done by the commits on either side.)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to