Calculate Cyclomatic Complexity for an entire file

Hi,

I want to calculate the cyclomatic complexity and total lines of code (after comments and empty lines have been removed) in Sonarcloud. I want to calculate both metrics for each file. However, I cannot currently find anywhere to collect these metrics. Do you know if they exist or if I must use another tool?

Hey there.

You should be able to find this information in the Measures tab of your SonarCloud project under Complexity and Size. Here’s an example.

Thanks - appreciate it!