What is the Difference between lines of code and Lines to cover

Hi ,

I need to understand what is difference between Lines of code and Lines to cover in sonarqube dashboard.

For every project there is a lot of difference between these metric values.

Which metric is does sonarqube consider for the license for Lines of code (ex: 75 M lines of code)

Thanks,
Ediga Nareshgoud

Thanks

Hi!
Consider a Java example:
So, why sonar in overall coverage include for calculates with lines of code like package… / import…?
I’ve get Overall Coverage (17% - index of overall lines 4.8k - that include package…/import…/ {()} )
and Line Coverage(52% - index of 1.8k lines to cover). Real mark - is Line Coverage(52%) ,
but in main page of project - in Overall use mark (17%).

  • I don’t understand why that mark calculate if that lines of code can’t be covered by unit tests
    and How I can change it on 52% in Overview ?

Hey there.

I’m having a trouble deciphering the situation from your post (and what the question is). Can you provide some screenshots demonstrating what you’re talking about?