The Cyclomatic Complexity rule counts isDebugEnabled()
conditionals in its calculation which results in false
measurements since these conditionals do not really
result in branches in the code that need to be tested.
As a result, on our project we have lots of false
warnings, so many that we must either raise the limit
(with the risk that really complex methods may slip by)
or deactivate the rule altogether.
A simple fix would allow the exclusion of conditionals
based on isDebugEnabled.
Log in to post a comment.