Find out reason of LoC difference between Projects and License page

which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
9.0.1.46107

what are you trying to achieve
find out why my LoC is different in the Admin > License page and the Projects page.
I understand that sonar uses the “biggest” branch to compute overall LoC.
I guess that the Projects page displays the LoC of master (which is not necessarily the biggest branch)
But, by summing the LoC displayed in the Projects page I ended up around 800K, whereas the License page shows 1.1M.

How can I find out which project is taking (way way) more space than its master branch?

what have you tried so far to achieve this
I deleted and reanalyzed a project that I suspected
I computed the LoC displayed in the Project page manually
I computed the LoC via the DB (with another result)

Any help on how to investigate this? Any query to suggest?
Anything to do that does not imply deleting everything ?

Thanks!

Hi,

Welcome to the community!

Yes!

The best thing you can do here is upgrade to the latest version; 9.6 was released yesterday. It includes the api/projects/license_usage web service that will give you the largest branch of each project, its LOC and % license usage.

 
HTH,
Ann

1 Like

Thank you for your quick answer

This new WS is great news :slight_smile:

We will upgrade ASAP and I’ll let you know

Best regards

Thank you for you help
The api/projects/license_usage endpoint gave me the info I needed

1 Like

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