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
Post a Comment