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

Jay Pipes jaypipes at gmail.com
Fri Oct 17 10:41:26 UTC 2014


On 10/17/2014 05:10 AM, Chris Dent wrote:
> On Fri, 17 Oct 2014, Daniel P. Berrange wrote:
>
>> 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.
>
> I find a lot of the OpenStack code very hard to read. If it is very
> hard to read it is very hard to maintain, whether that means fix or
> improve.

Exactly, ++.

> That said, the value I see in these kinds of tools is not
> specifically in preventing complexity, but in providing entry points
> for people who want to fix things. You don't know where to start
> (because you haven't yet got the insight or experience): run
> flake8 or pylint or some other tools, do what it tells you. In the
> process you will:
>
> * learn more about the code
> * probably find bugs
> * make an incremental improvement to something that needs it

Agreed.

-jay



More information about the OpenStack-dev mailing list