java - Does Sonar's complexity metric include equals() and hashCode() methods -


when sonar calculates cyclomatic complexity equals() , hashcode() methods included?

if there way exclude them?

yes, every method used compute overall complexity of enclosing class.

i guess understand why you're asking such question: modern ides generate #equals() , #hashcode() methods you, , generated method tend quite complex. however, part of code, , add complexity: should tested - other method, prevent regression.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -