Issue with SonarQube 7.6 Developer Edition and Licensed Lines of Code

(Joseph Morais) #1
  • SonarQube

Getting the following error when running a full scan against one of our projects:

“The last analysis has failed to not exceed the 100000 lines of code limit allowed by the current license”

We are currently at “83,249 lines currently analyzed” on the Licensing Manager page. The project in question was last scanned earlier this month at is listed 23K lines of code. When I drill down to lines of code I see:

New Lines
Lines of Code

Adding 8,279 new lines to the existing 83,249 would not exceed the total of 100k. Any ideas?

(G Ann Campbell) #2


It sounds like your project might be being treated as a new project. Make sure the value being passed during analysis for sonar.projectKey matches the value displayed for the project at the bottom right of the project homepage.


(Joseph Morais) #3

Hello Ann,

Our key is the format of: com.contoso:contoso-server. I added the the following line to our scanner config:


Does this look correct? I did try a run using the above and we are still seeing the issue unfortunately. Is there any other way to verify?

(G Ann Campbell) #4


Let’s come at this from a different angle. Go to the global background tasks page (Administration > Projects > Background Tasks). You’ll see the failed background task for this project. You can verify that it’s the right one by checking the Error Details (look under that row’s cog menu). Then click through on the project name and make sure you end up where you expect.

If you do then you’re genuinely looking at a whole lot more lines of code in the project. If that’s the case:

  • Ping the devs. Maybe they just pulled a giant new JS library that needs to be excluded from analysis?
  • Check the CI log. Is the correct project and only the correct checked out?
  • Have new language analyzers been added to your SonarQube instance and you need to exclude files from that language from this project?


(Joseph Morais) #5

Hello Ann,

Thanks again for input. I have confirmed it is indeed hitting the correct project. How can I best gauge which licensing level we actually need based on the current server settings? According to what is available (e.g. the original post) we should be under the threshold, if we are in fact going over how do we know by how much?

(G Ann Campbell) #6


I don’t believe there is a way to show how far over the license limit an analysis will take you. Your best bet is to ping your sales contact to help you work through this.