How is it possible to know the number of lines are analyzed?

I can see in every analysis the files scanned like

1935/1935 source files have been analyzed

but not the number of lines. Is it possible see this info because it is important for the bill?

At the moment I’m using this command

find . -name '*.php' | sed 's/.*/"&"/' | xargs  wc -l

but it would be nice to see the number of lines analized in every scan.


First, we distinguish between lines (physical line breaks) and lines of code. Not every line is a line of code, and we don’t include blank lines and comment-only lines in your LoC count.

We don’t output LOC as part of the analysis logs. But you can find it in the UI. You’ll find the Lines of Code count used for billing purposes on the Measures tab. You should be aware, though, that you’ll need to check each branch’s value to find the largest branch to understand what you’re being billed for.


Hi Ann,

Thank you for your explanation.

I have a question.

I have done some analysis in some branches

But If I go to billing section I see 0 lines analyzed

Screenshot 2022-04-13 at 10.21.28

But in logs I can see sonarcloud has analyzed 1935 files.

Can you explain me why I see 0 lines analyzed in the billing section, please ?


Is that project public or private? We only charge for LoC in private projects.


Hi, it’s private.


Thanks. And just to be certain, that single analyzed branch your screenshot shows has >0 LoC? Because I don’t think PRs are counted toward license consumption.


Hi Ann,

Thank you for your comments. They are very useful for understand sonarcloud product.

At the moment we are using sonarcloud in a single branch that has a PRs associated.
Every time we push a commit in that branch the pipeline with sonar scan is executed.

Hey there.

It looks like there’s one branch analyzed under Branches – are there any Lines of Code / issues reported there, or is it empty?