vs Baseline:{{ baseline_coverage.line_coverage_percent|format_percent }} coverage{{ baseline_coverage.covered_lines }}/{{ baseline_coverage.total_lines }} lines
{% endif %}
{% endif %}
{% if coverage and coverage.functions %}
{# Uncovered functions first (is_covered False sorts before True),
alphabetical within each group โ sort is stable. #}
{% for func in coverage.functions|sort(attribute='demangled_name')|sort(attribute='is_covered') %}
โ{{ func.demangled_name or func.name }}{{ func.execution_count }}ร
{% if not source_lines and coverage and coverage.lines %}
โ ๏ธ Source file not found on disk ({{ file_path }}) โ showing coverage data only
(line numbers + hit counts). Generate the report where the sources live to see code.
{% endif %}
{% for line in source_lines %}
{% set line_num = loop.index %}
{% set is_added = line_num in added_lines %}
{% set line_cov = coverage.lines.get(line_num) if coverage else none %}
{% set is_covered = line_cov.is_covered if line_cov else none %}
{% set exec_count = line_cov.count if line_cov else none %}
{% set baseline_line_cov = baseline_coverage.lines.get(line_num) if baseline_coverage else none %}
{% set baseline_is_covered = baseline_line_cov.is_covered if baseline_line_cov else none %}
{% set coverage_changed = baseline_coverage and is_covered is not none and baseline_is_covered is not none and is_covered != baseline_is_covered %}
{% set newly_covered = coverage_changed and is_covered == true %}
{% set newly_uncovered = coverage_changed and is_covered == false %}
{% if exec_count is not none %}
{{ exec_count }}ร
{% endif %}
{{ line|e }}
{% endfor %}
{# Fallback: no source on disk, but we have coverage data.
Render one row per executable line so the page isn't blank. #}
{% if not source_lines and coverage and coverage.lines %}
{% for line_num, line_cov in coverage.lines|dictsort %}
{% set is_covered = line_cov.is_covered %}