SonarQube is licensed by the consumption against a lines-of-code budget.
A few projects can accidentally consume millions of LoC. In enterprise, it is difficult to monitor or control the output of app teams. There is a risk that a few undiciplined projects can quickly result in a platform running out of LoC. Since SonarQube is integral to CI/CD, this may result in an global outage as teams would not be able to continue building software.
To contain the blast radius of too many LoC, allow the platform admin to:
At the organization-level, set a global threshold that will notify when a project exceeds an admin-defined budget. This will allow for review and corrective action if necessary.
At the organization-level, set a global threshold that will deactivate a project exceeds an admin-defined budget. This will help mitigate the concern of a single project taking out the organization
Provide a mechanism to allow admin to allow specific projects to surpass the blocking threshold.
You’ve tagged this with SonarQube Cloud. Is that your context? At an enterprise level, the admin can give an allotment of License LOC per child-organization. It sounds like you want to extend the metaphor (so to speak) down to the project level as well?
With some companies going with the single/few org approach, there might be hundreds of independent projects under a single org. It would take just one team forgetting to set their .gitignore and pushing their build dependencies into the SCM that would easily result in 1M+ lines of code.
The ramifications could be:
The entire org threshold exceeded and all build failing due to one team’s mistake
Without alerting, this might not be noticed for sometime resulting in a extensive cleanup later.
As a SonarQube Cloud admin, I would like to be able to set a default org-wide LOC allotment for every project. Within each project, I would also like the ability to set an explicit allotment which would take precedent.