Measures Project Overview for entire project

I have a question about the “Measures” tab. I am using SonarQube 7.7. When I go to “Measures”, the “Project Overview” bubble graph shows by default. This is a useful graph, however, this bubble graph is limited. Specifically in the top right corner it says “New code: since a.b.c.d”. So this tells me that there might be some “old code” which is a big red circle but I don’t see it because it’s only showing “New code: since…”. Is there a way for this bubble graph to represent ALL code? I’m ok with it showing the top 500 (which I’m assuming is the worse of the code).

Hi,

Welcome to the community!

You raise an excellent point. In fact, those overview graphs are overall, rather than only On New Code. That yellow box is only intended to help you understand what’s considered “New”, not label the page contents. In fact, if you look you’ll see that it’s on every single page in the Measure space, even the ones explicitly for Overall values.

I’ll raise this internally & we’ll update the thread if a ticket gets created.

 
Ann

Hi Ann, thank you for the response.

I’m not sure if this really answered my question. I say this because let’s consider another situation. Inside of SonarQube I switch from the “master” branch to a different “release” branch which we recently used to build a new release. When on this “release” branch, the “Project Overview” shows 55/55 files where on the “master” branch it shows 500 / 1416 files. The “master” information is even more confusing because when I expand the “Size” section it shows 1175 files. So trying to understand the information in “Measures” isn’t very intuitive. Is there some video tutorial or something that walks through what’s going on?

Hi,

In reviewing your OP, I see that you’re on 7.7, which is past EOL. This is significant here because by the current version (which is what I’m looking at when I reply) the there has been work to simplify branches & drop the short-lived branch concept. Are you seeing this in a short-lived or long-lived branch? I would guess the former, which would explain your “short” numbers.

At any rate, I suggest you upgrade:

7.7 → 7.9.3 → 8.4.1

To get the latest/greatest branch functionality.

 
Ann

Yes, it is under the “short-lived” list. The the RegEx pattern should have made it a long living branch but unfortunately the RegEx wasn’t quite correct.

Upgrading is a complex issue as all infrastructure upgrades are. So for now I need to assume i’ll be operating with 7.7 for some time.

Hi,

I get that. I just want to point out to you that 7.9 has been out for just over a year now, and the next LTS is due in just over another 6 months (current ETA Feb2021 IIRC).

 
Ann

So can you help explain how the “measures” tab determines it’s numbers because the values are confusing. I did a fresh build of our latest release branch and I saw the branch shows up in SonarQube as a long-lived branch now. so I switch to that branch and click on the “measures” tab. The Project Overview bubble graph shows 500 / 1421 files. But when I expand the “Size” metric, it shows 1178 files. 1421 != 1178, so why the difference? Furthermore, from the source code I know there are 1048 Java source files in the project. However in SonarQube, if drill into the “Size” > Files metric and count the number of Java files that count is only 805. So it seems line SonarQube is missing over 200 Java source files?

Hi,

So first, these are fair questions and well spotted! I can’t immediately answer the first question (I’m pursuing it internally). For the second question of missing Java files, is it possible that the missing files have been excluded from analysis?

 
Ann

Hi,

I have an answer for the first question.

Just for transparency, here’s what I posted internally:

A user has just asked me about discrepancies on the Measures tab. The first one is easy for me to reproduce on Next:

Specifically the number of files listed with the Project Overview graph versus the number of files shown in the Size->Files metric.

…help?

The answer I got is that the Files number is correct. The number listed at the top-right of the graph is actually the number of components (files + directories IIRC).

We’ll get this one fixed “soon”.

 
Ann

Thanks for the update.