Developer Edition: Failed analysis due to lines of code limit

  • SonarQube Version: Developer Edition Version 8.0 (build 29455)
  • What are you trying to achieve: Analyze master branch
  • What have you tried so far to achieve this: Check license page, sent email to contact email

Hi Support,
We are experiencing an issue with our SonarQube analysis. We purchased a Developer License.
We have a single project and two branches defined for analysis: Develop and Master.

Develop branch passes analysis but we get the following error in master:

Our master branch has less lines of code than develop, can you please let me know what could be wrong.

Thank you

any ideas?

Hi,

Welcome to the community!

So you know, this is a community of interest for people interested in SonarSource products. It is not “staffed”, and people answer (or not) as time and interest allow. :slightly_smiling_face:

The largest branch of each project is counted for licensing purposes. It sounds like your new master analysis adds a lot of LOC…?

 
Ann

Hi Ann, I appreciate your reply!
Do you know if deleting the project in SonarQube will reset the total LOC count?

By doing this hopefully we can determine then analyze the largest branch first. Then the other branch can still be analyzed.

Thanks,
Edreih

Hi Edreih,

Yes.

Actually, this part is a bit odd. If the two branches are really part of the same project then only one should impact the line count. From what you’ve described, it sounds like the new analysis adds a lot of LOC to the master branch, so you’ll be right back in the same position.

Just to be sure, how about a screenshot of your Projects Management page (Administration->Projects->Management) to double-check/verify the total project count? E.G.

 
Ann

1 Like

Right. The two branches are part of the same project.

  • The develop branch is at 1.6M lines of code and was last analyzed on December 20.
  • The master branch has not been analyzed.

Here is a screenshot of the Projects management page.

Hi,

Thanks for the screenshot. It confirms what you said - just one project in the instance. (Sorry, but sometimes you have to back up to the “dumb” questions. :frowning:)

So now I’m back to: a lot of lines have been added in master. That, or… do you have exclusions set up in the develop branch that aren’t set up/applied on master? Unfortunately there are multiple places to look:

  • Project-level Administration->General Settings->Analysis Scope
  • In your sonar-project.properties / pom.xml
  • On the analysis command line

(Note that I don’t recommend either of the last two, but people do it.)

 
Ann

1 Like

Ann, thank you. We do not use the last two places to set exclusions.
We use:

  • Administration tab > Analysis Scope
  • Project > Administration > General Settings > Analysis Scope

What is the difference between these two?

I set some additional exclusions on the project-level and now our master branch was analyzed (1.3M LOC). I’m not entirely sure if that was the sole cause of the analysis going through. Nevertheless, thanks for your help.

Hi,

I’m glad you got this working!

The first one sets global defaults for all projects. Unless overridden, these will apply everywhere.
The second one sets/overrides at a project level. Values set here can be overridden in those other places I mention. The full hierarchy is laid out at the top of this docs page.

 
Ann

1 Like