gwastro / gwin

A python package for Bayesian inference of gravitational-wave data
GNU General Public License v3.0
14 stars 26 forks source link

Loosen Code Climate checks #32

Closed cdcapano closed 6 years ago

cdcapano commented 6 years ago

I think the checks in Code Climate are currently too draconian. This changes the following (I think anyway... not entirely should I got the right commands):

I want to turn off the cognitive complexity test because it's not really well defined what it's doing. For example, in #17, Code Climate complained that this function had a cognitive complexity of 6, which was above the threshold of 5. I don't really know what that means, and I personally didn't find that function to be very hard to understand (granted, I'm biased, since I wrote it). Really, this is something that is the reviewers job to check.

For similar reasons I'm also tempted to turn off the cyclomatic complexity test, but can see how that might be able to provide feedback that a reviewer might not immediately catch.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 112


Totals Coverage Status
Change from base Build 102: 0.0%
Covered Lines: 1014
Relevant Lines: 2502

💛 - Coveralls
cdcapano commented 6 years ago

@duncanmmacleod poke

duncanmmacleod commented 6 years ago

@cdcapano, apologies for the delay, I've been on holiday. My only concern is disabling the cognitive complexity test. I think it is useful to have that test enabled, even if its hard to act on the results you get from it on codeclimate - just knowing that a method is cognitively complex will make one sit and think about it for a minute, even if no changes are made as a result (as I've just done for the method you linked in your opening post).

cdcapano commented 6 years ago

@duncanmmacleod Ok, fair enough... I've turned the cognitive complexity test back on.