Initial master scan is hard to create because of licensed lines of code exceeded

Hello,

our environment:

  • Developer Edition 5 Mio. LOC - sonarqube version 7.9.1;
  • latest SonarScanner for Linux and latest build-wrapper;
  • server running on Centos7 and using Postgresql 9.6

After creating a new project trying to do the initail master scan was very hard, as it always failed with this error message:

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

It was pretty clear, that we had to exclude some third party sources and some other soucres not fro analysing from our product to keep the licensed LOC. But sonarqube makes it very hard because it doesn’t show you the number of lines exceeding the license. So you have to try and error and iterate until number of lines fits to the license.

I would ask for an improvement in the error message, to show not only the license limit but also the number of lines exceeding the limit. This would really help to exclude sources without try and error.

Something like eg.

*“The last analysis has failed to not exceed the 5000000 lines of code limit limit allowed by the current license by 123456 lines”.

Thank you in advance.

Hi @ascheurich,

Welcome to this community forum and thanks for this feedback.

To avoid to try and error and iterate, I would recommend to discuss with your Sales Rep, who will be the right contact to discuss with you about a temp key just to check the exact volume of lines of code you have and how to narrow the focus of your code, to remain below your purchased threshold.

Carine

Hi Carine,
thank you for your quick reply.

Size of code of course changes with each new release, so a one-shot check with a temp key wouldn’t really help us. Also the to narrow the focus of your code web page have been read carefully by us before configuring the server and the scan properties. There are in deed many configuration options for code analysis mostly based on filters and regex and we already use them. But this alone does not solve the topic. We (and probably also other users) use multi module project analysis and have to exclude complete modules from being written in the properties file (eg. with third party code) to eclude them from being scanned.

So again, we really needed much time to select this modules to exclude before getting a successful initial scan; this was the fact because sonarqube gives you no response about number of exceeding lines of code, which are out of license limit.
A simple improvement, eg. writing total number of code lines detected to the error message and/or to the linked page "INFO: More about the report processing at " would really help.

Regards, Andreas