DocumentationCore ConceptsChange Code Coverage

Changed Code Coverage

To calculate changed code coverage, a baseline must be set, which can be either a Commit SHA or a Branch.

ℹ️

Configuration of the baseline can be referenced in the Compare Target configuration.

Calculation

Logic

  1. Traverse all statements, functions, and branches to identify uncovered lines.
  2. Use git diff to find newly added lines of code.
  3. Determine which of the newly added lines belong to the uncovered lines.

In short, it refers to the uncovered lines in the coverage details.

Formula

newline=Add number of lines - Not covered Add linesAdd number of lines\text{newline} = \frac{\text{Add number of lines - Not covered Add lines}}{\text{Add number of lines}}