[openstack-dev] [all] add cyclomatic complexity check to pep8 target

Daniel P. Berrange berrange at redhat.com
Fri Oct 17 06:32:12 UTC 2014


On Fri, Oct 17, 2014 at 03:03:43PM +1100, Michael Still wrote:
> I think nova wins. We have:
> 
> ./nova/virt/libvirt/driver.py:3736:1: C901
> 'LibvirtDriver._get_guest_config' is too complex (67)

IMHO this tool is of pretty dubious value. I mean that function is long
for sure, but it is by no means a serious problem in the Nova libvirt
codebase. The stuff it complains about in the libvirt/config.py file is
just incredibly stupid thing to highlight.

We've got plenty of big problems that need addressing in the OpenStack
codebase and I don't see this tool highlighting any of them. Better to
have people focus on solving actual real problems we have than trying
to get some arbitrary code analysis score to hit a magic value.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



More information about the OpenStack-dev mailing list