SonarQube 6.7.5 Branch analysis missing

I would like to get the analysis for the branches created from the main branch - master, Sonarqube version 6.7.5.

I specified in the configuration file the branch name using <> and also I do “git fetch --depth=10000” before running Sonarqube analysis. The branches seems to be recognized by Sonarqube. See PICTURE 1 below.

The problem is that when I go to the specific branch I do not see any smells code etc., even if I knowingly added some on the given branch (so it is different from master). See PICTURE 2 below.

The changed file is recognized by Sonraqube and contains the konwingly made bugs (in the code tab). See PICTURE 3 below.

What should I do to see the code smells for branches?

Many thanks,

Hi Karolina,

in Sonarqube 6.7.5, shortlived branches had their own fixed quality gate = no open issues.
Real quality gates came only with Sonarqube 7.7 AFAIK

So in your case, the analysis of those shortlived branches raised no issues at all, picture 3
shows no issues for os_main.c .
Did you see an issue with Sonarlint plugin ?
The question is, why didn’t the scan pick up your intentional bug.

it is because of flaws in the used version of the language plugin ?
this file is excluded via exclusion pattern ?
the used quality profile doesn’t contain the rule that catches your bug or it’s an exceptional case
of that rule that raises no issue ?, see rule description
an exception occured during the analysis ? you need to check the logs

After all you should upgrade to Sonarqube 7.9.1 LTS - updates of the language scanner plugins
inclusive, before any further investigations.


1 Like

Hi Gilbert,

Thank you for a qucik answer. Actually, it works! Your question if I checked it with SonarLint gave me a hint! Actually, the bug I knowingly did was not discovered by the Sonarqube : ( and this leads to my new question. I am using Enterprise Edition of Sonarqube version 6.7.5. The bug I did is following:

unsigned int a;
if (a < 0) {
// Here I do some stuff

I would expect Sonarqube to give me some warnings in this case (?). What should I do to get one?

Thank you a lot,

Hi Karolina,

as already said, you need to update to the latest 7.9.1 LTS version.
You won’t get support anymore for version 6.7.5
After updating your Sonarqube instance and language scanner plugins let’s see if your problem still exists.


1 Like