Renewed subscription does not start with full scan capacity

Hi. We entered our new license and we expect that now we’ll have full clear 250K available. But there’re some 76K lines of codes that reported as “used” when we didn’t make new scans except one small project that reported only 244 scanned lines. So we’d want to know what these lines are, when made, for what project etc. Mail sent to our contacts but “Berkay Bektas“ wrote in his answer: “Would you kindly be able to open a thread on the community forum? A member of my technical team will reach out to assist.“ So, this is why I’m here. Thank you.

Hi,

I’m not a SonarSourcer, and I’m also a bit surprised your contact couldn’t clarify this. It’s actually quite simple.

What you’re seeing is expected behavior. SonarQube licenses are based on the total Lines of Code (LOC) currently stored on the server, not on how many lines you’ve scanned “since” the new license was activated.

When you enter a new license (e.g., 250k), the Used value immediately reflects the LOC of all existing projects already analyzed and still present in the database. So the ~76k you see comes from previously analyzed projects that remain on the server.

For licensing purposes, SonarQube counts the LOC of the largest branch (by LOC) from the most recent analysis of each project, then sums those values across all projects on the instance.

You could analyze the same 100k-LOC project a million times and you’d still only consume 100k LOC from your license. It’s about the total stored, not the number of scans.

1 Like

Thank you. But there is some problem here: if I have made 248K LOC scanned and now bought another 250K license and want to scan another (NOT THE SAME) project with 70K LOCs, it means that I’ll not be able to do it. Because it is occupied but what i did in the past?!! Sounds strange. If I’d get 2 different stocks: “Scanned” (that I made and paid for and can return to it for free) and “AvailableToScan“ (what is left in my current license that I can use), I’d understand it. Paid for 250K, scanned 50K (detailed scan report attached), available 200K. No questions will arrive.

Hi,

Your license covers your LOC under analysis. And it’s a living number. It’s not that you’ve purchased a new license to analyze a new, additional set of 250k LOC. You’ve purchased a license to have up to 250k LOC live on your SonarQube instance.

The docs may help.

 
Ann

2 Likes

Got it. Thnx.

Questions: 1) If I’ve deleted old project(s) and don’t need the analyzed code anymore, will it stay forever in my stock? 2) Can I buy a separate license and start from empty?

Hi,

If you’ve deleted old project, then they’re not currently “under analysis”. They get removed from your license usage.

For a separate, brand new SonarQube instance? Sure.

You can also buy a license for 500k: the 248k you already have under analysis + the 250k you want to add.

 
HTH,
Ann