Sonar Qube Scanner Information

Hi ,
Can any please let me know if there is any link between code coverage and scanning.If code coverage is 2 % does that mean that scanning is also 2 %. How can we be assure that sonar qube is scanning our whole project.Your early response will be very helpful.

Best regards,
Pooja

Hello @Pooja12,

There is no relationship whatsoever.
Let’s take a practical example to be clearer: You analyze a project with 20 files and 10’000 lines to cover (this is a detail no so important for the example, but lines toc over are different from (are a subset of) lines of code. We can explain that later.
Coverage is 2% means that 2% of the 10’000 lines to cover, ie 200 lines covered. (Again here the reality is slightly more subtle if your coverage tool produces condition coverage information, but it’s not so important for our example).

"Scanning is also %2" does not make a lot of sense to me. What do you mean by that ?
By definition the scanner scans all the source code it can find, so I’d say scanning is always 100% (excepted for scan configuration mistakes that may cause to scan less than all the source code).

Olivier

1 Like

Hi @OlivierK,
Thanks a lot for your response. I was also sure about this but just needed an official confirmation to move ahead. Have a great day!

Best regards,
Pooja