]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Turn on Flake-8 Complexity Checking
authorJohn Griffith <john.griffith8@gmail.com>
Fri, 17 Oct 2014 04:43:20 +0000 (22:43 -0600)
committerJohn Griffith <john.griffith8@gmail.com>
Fri, 17 Oct 2014 19:53:31 +0000 (13:53 -0600)
commitfc6c7285cd363cc634f258b69001a7911425778b
tree496ffa1fd636582b94632f2fa8facb3899a08f06
parent25c370a7a638ed7b61a6e13def5382b668361d30
Turn on Flake-8 Complexity Checking

Flake8 provides the ability to measure code complexity. There are
a lot of modules in Cinder that are considered "too complex", the
worst being "cinder/tests/test_huawei_hvs.py:110:1:" with a complexity
ranking of 59.

There's some outlyers at the higher end here, but the majority of the
code checks in at under 30, so let's make that our threshold and ignore
the two offenders that are above that for now.

Granted this may or may not be valuable, but it doesn't hurt to try it
and if we all hate it or find there's no value but it makes life difficult
we can always turn it back off.

See flake8.readthedocs for more info on flake8 and McCabe complexity
checking.

Change-Id: Icc1b5f2ccf0b630c1e655f5e6abf4e25ee30afc4
cinder/tests/test_huawei_hvs.py
cinder/tests/test_netapp.py
tox.ini