Issues with LoC for Develop and Master Branch

Hi,

I’m currently running SonarQube 7.9.3 with a license for 250k LoC.

I’m interested in code analysis for my develop branch, as my master branch represents the code base, which is in the current customer version.

For my first analysis, I had to choose the master branch, because SonarQube wouldn’t let me analyse my develop branch.
The result has been around 200k LoC were analysed.

I switched then to my develop branch and with the following analysis I got the error that the limit of 250k LoC is exceeded.
The difference between these two branches is within 1k LoC.

How is SonarQube calculating these values?
Can I “reset” my license to start with develop branch?

Feedback would be much appreciated.

Regards,

Markus from Germany

Hi,

Welcome to the community!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.3 → 8.9.2 → 9.0.1 (last step optional)

Regarding your actual question, it sounds like SonarQube thought it was another project, rather than another branch. Once you’ve upgraded, you should take a look at the current docs to make sure you’ve got all the right parameters in place with the correct values.

And it’s worth pointing out that even though SonarQube is going to call your primary branch “main” by default, you can actually analyze develop as your primary branch if you like. And once you get to a current version, you’ll be able to rename it in the interface to “develop”.

Also relevant.

 
HTH,
Ann

Hi Ann,

thank you for you recent reply.

Is the version upgrade accompanied with a new purchase of a license?
Or can we just upgrade our existing system?

What docs and what parameters are you referring to?

Regards,

Markus

Hi Markus,

Version-to-version upgrades are always free - and encouraged! You can just upgrade your existing system. The docs should help.

Here’s a link to the top of the docs tree, and here’s a link to the docs on branch analysis.

 
HTH,
Ann

Hi Ann,

are system is now on Version 8.9.2 and we did a DB Wipe to reset the LoC limit.
If I understand the instructions correctly, I have to change the default branch first, before starting any new analysis.
But for changing the primary branch, I have to get into the project settings which SonarQube won’t allow me, until my first analysis.
Am I missing here something?

Regards,

Markus

And since we made a DB Wipe, the server ID has changed, so we would need a new license:

Server ID: B5316926-AXwnXgPB8zHM7f8z99ok
Version: 8.9.2.46101
Date: 2021-09-28

Regards,

Markus

Hi @MarkusSeidel
You should ask either your Sales rep or contact@sonarsource.com for changing the license key.

Have a nice day
Carine

1 Like

Hi Markus,

You can provision the project manually or import it from your DevOps platform. Both are accessible from the ‘Create’ button on the global Projects page. That creates the project on the SonarQube side so you can adjust the settings before the first analysis.

 
HTH,
Ann