Sonar scanner detects less issues when Jenkins's home directory set to a network mapped drive

Initially we setup Jenkins home directory to local C:\ drive and used sonar scanner to be able to detect 29 different issues from a C library project. Once we change Jenkins home directory from C:\ local drive to a network mapped Y:\ drive and re-ran the same job, the detected issues reduce to 12 trial and important 17 issues were missed. I wonder why?

We copied all contents from Jenkins home directory in local C:\ drive to it’s home directory in a network mapped Y:\ drive when we changed the home directory.

Our C library repo has one submodule inside and we use multiple SCMs (Git) to clone the source into Jenkins home directory. We observed a lot of warnings – “WARN: Missing blame information for the following files” in jenkins console output.

Hi,

So first, what version of SonarQube are you using?

And could you expand a bit on

When you re-ran, was it a full checkout, clean, build and analyze? Because I think just moving the existing workspace and re-using the artifacts left over from the old job (with the old paths) wouldn’t be expected to work.

 
Ann

Hi Ann,

Thanks for the early response.
We use SonarQube version 9.3. It is a full checkout, clean build, and analysis.

Hi,

Could this be about library location / availability?

Also, other than the warnings about missing blame information, are the analysis logs markedly different?

In fact, it will help to supply analysis logs, as well as the build-wrapper output.

 
Ann

Thanks, Ann,

I am a newbie of SonarQube. When you said “are the analysis logs markedly different?”, what do you mean? Would you provide more details I can check?

Where do both the analysis logs and build-wrapper output locate and what are the name of the files?

Zhi

Hi,

The analysis logs are what’s output from the analysis command. Basically the console output. I used to know how to find this in Jenkins (it’s in there somewhere!) but it’s been a while.

The build-wrapper output is going to be the files in the directory you specified on your compile command (this is C, right?).

 
Ann

Hello @zhu,

Can you try with with the latest SonarQube(9.4)? We fixed similar issue recently: [CPP-3461] Fix the scope of the analysis on windows with network drives, symbolic links, and junctions - SonarSource.

Thanks,

Hi Abbas,

Thanks for the feedback.

Please confirm that the issue CPP-3461 is fixed in the latest SonarQube(9.4) for both developer license and enterprise license.

Hi Ann,

Thanks for the information.
We decide to try SonarQube 9.4 first and see if it resolved our issue.

Zhi

Hi Abbas and Ann,

I confirm that SonarQube version 9.4 does fix our issue.
Thanks both of you for your support and help.

Zhi

1 Like

Hi @zhu

Thank you for letting us know!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.