Effort estimation is largely underestimated for cognitive complexity issues

Hi,
See for example:
https://sonarcloud.io/project/issues?resolved=false&rules=typescript%3AS3776&id=brave_brave-core&open=AXelervnbtYYmN5cwmzK

The method has a cognitive complexity of 68 which leads to a 58min effort estimation…
the estimation should grow at least quadratically (not to say exponentially) with the complexity.

Regards,

/DV

Hello @Dominique_Villard ,

You may be able to tune the effort estimation calculation of rules with https://sonarcloud.io/web_api/api/rules but unfortunately we only offer a linear (not quadratic) model.
You can configure the floor effort (if you go above threshold of complexity) and the gap multiplier (the cost in minutes for each additional point of complexity above threshold).

Note that for cognitive complexity there is some sort of non-linear (but not quadratic either) cost included when nesting blocks (if or loops) because each nesting level costs significantly more than the previous (+1, then +3, … then +2n+1 for the nth level of nesting)

Olivier

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.