January 30, 2023, 7:42am
Hi everyone, I would like to find out whether it is possible to get the derivation of the scores of cognitive complexity, which means how Sonarqube calculated the scores. The whitebook of cognitive complexity shows some examples of code and how the related scores are calculated. Is there any ways to get that for real projects? Thanks.
January 31, 2023, 9:23am
Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:
7.5 → 7.9.6 → 8.9.10 → 9.8 (last step optional)
(Note that the release of a new LTS, 9.9, is expected on 7 Feb 2023.)
You may find the
Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.
And – in any version of SonarQube, it’s only possible to see how the Cognitive Complexity was calculated for a given function/method when an issue has been raised – like
Cognitive Complexity of methods should not be too high. See this issue as an example
February 1, 2023, 9:22am
Thank you for your kindly reply. I also want to inquire that is it possible to see complexity scores on the overview page. Thanks again!
February 6, 2023, 3:46pm
It’s not possible – but you can view complexity scores in the
Measures tab of your project.