Is the code complexity for code to strict?
simonvh opened this issue · 4 comments
Currently, the codeclimate is used to check code, which is good. However, in my opinion the "code complexity" cutoff is currently way too strict. While I think checking code complexity in principle is good, I think it should not be so strict that it stands in our way. Now, I have the feeling that adding new features takes twice as long to satisfy this code complexity cutoff of 5.
@siebrenf @Maarten-vd-Sande what are your opinions here?
Yes when I worked with codeclimate i was struggling with this too. 5 is quite strict indeed. Maybe that number is based on different types of applications (not scientific code)?
In the end codeclimate is here to help you, not to limit you in your work
Yeah, I think for us (working in a scientific environment), we should balance our effort here. Some sanity checks are good, but it should not stand in the way of being able to develop relatively quickly.
(I do think it helps to prevent me from writing these horrible monster-functions like those that are present in gimmemotifs. :-) )
A code complexity of 5 is very low. That said, it doesn't prevent us from merging, but does remind us to check for overly complex code early.
If we would increase the threshold, what should it be? 10, 15? I would go for the lowest possible increase, but there would still be functions that are too complex, despite being 'pretty clean' in my opinion!
btw, our current high-score is 23 with Genome._bed_to_seqs()