How to resolve line of code limit issue in sonarqube?

I am running sonar-scanner msbuild(ver 4.3.1) on my project . Since i didn’t provide sonar.language properties during analysis it has analysed the .js files too. And now I am getting the error “Analyses suspended. You reached your 250000 lines of code limit allowed by your current license.Go to License page.” on the sonarqube project dashboard .

Now ,when i am running analysis by skipping the .js files, though the analysis is successful the results are not getting reflected on dashboard.

What can I do to view results of new analysis on sonarqube dashboard ? Does deleting the project free-up that much lines of code , so that i can run analysis again (removing the .js files)?

Also, how can we use sonar.language property in command line while running analysis using scanner for msbuild ?
Sonarqube ver is 4.7 , we are having developer’s license.
Thanks in Advance !!

Probably 7.4 :wink: 4.7 does not exist.

Are those 3-rd party libraries? If yes, you should exclude them from the analysis scope.


Read more here: Narrowing the Focus.

Sonarqube version is actually 7. 1 .
I have excluded .js files folder and run the analysis again ,but its not getting reflected on dashboard .
As lines of code limit is over .
Do i have to delete that project to free up lines of code .
It’s not getting updated when i am running analysis with same key.


Since you’re on 7.1, you will need to delete something to get going again. Subsequent versions stop you before you go over the limit, but 7.1 doesn’t.

In terms of avoiding this in the future, I’d like to reinforce Adam’s excellent answer about excluding third-party libraries and generated code. Additionally, it seems that you previously didn’t analyze .js files at all? If that’s the case, then once you’ve deleted your project, you should re-provision it, and use the UI to set file exclusions on something like **/*.js. This is the preferred way to do, rather than by using sonar.language; that property has been deprecated for literally years and was removed in 7.7.


1 Like

Hi Ann , This holds true for ver 6.7 too , right ? I mean deleting a project will free up that much of lines of code when using sonarqube ver 6.7 .

Yup. :slight_smile:

HI Ann,
I have deleted the project and run the analysis again . But new issues are appearing only for .cs files and not for .vb files . Note that i have skipped only folders for .js and not .vb files.
Also when i expicitly provide sonar.language = “vbnet” , results doesn’t show any issues after analysis
and lines of code appears to be zero . Any idea why it’s skipping .vb files from anlysing.


It would be best to start a new thread for this new issue. Please fully describe what you’re doing, what’s happening, and what you expect to happen. It will probably be helpful to include a screenshot of your exclusion specification.