How to get a list of the "license" lines of code per project?

We are using SonarQube Developer which is licensed by Lines Of Code (LOC). For licensing purpose, lines of code for any given project is the number of lines of code on the largest branch.

How can I get a list of projects, lines of code, and the name of the largest branch? This is important because if someone creates a large branch in one of our 124 projects, I’m not able to see that it is eating up a significant part of our license.

Ideally, the license page would show the three columns: Project name, Lines of Code, Largest Branch.

Thanks for any suggestions on how to get this info.

Hey there.

What version of SonarQube are you using?

There is an API endpoint in the latest version, GET api/projects/license_usage , that should help instance administrators understand the LoC and branch being counted for each project.

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