title: In SonarQube what is the difference in meaning between the "Lines to Cover" and "Uncovered Lines" metrics?
body: <p>I am looking at the Coverage report within the Measures tab of a SonarQube analysed C++ project.  On that page my summary information is as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/TtKK7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TtKK7.png" alt="SonarQube Coverage Overview"></a></p>
  
  <h2>What are the differences between the "Lines to Cover" and "Uncovered Lines" metrics?</h2>
  
  <p>I have looked on <a href="https://docs.sonarqube.org/display/SONAR/Metric+Definitions#MetricDefinitions-Tests" rel="noreferrer">the sonarqube website's Metric Definitions page</a> but the two entries there to do not help me.  </p>
  
  <p><strong>Lines to cover</strong> - Number of lines of code which could be covered by unit tests (for example, blank lines or full comments lines are not considered as lines to cover).</p>
  
  <p><strong>Uncovered lines</strong> - Number of lines of code which are not covered by unit tests.</p>
  
  <p>The way that reads, I would expect that Uncovered Lines would be a higher count than the Lines to cover number, as the former might include blank lines.  If sonarqube understood the code somewhat it might also exclude exception handling from the "could be covered by unit tests" number as well.  </p>
  
  <p>The given numbers are clearly a reverse of that, so I must not be understanding the meaning correctly.  </p>
  
  <hr>
  
  <p>I have some unit tests run as part of the CI system and their code coverage is compilated using both lcov and gcov. The lcov data is passed through genhtml to make separate coverage report which currently gives data in some cases, so I may have partial misconfiguration issue adding to the confusion.  </p>