Skip to content

Commit 1be09f0

Browse files
flingurehainque
authored andcommitted
Add information on missing sources from SCOs for dhtml report
Change-Id: I324b9abf09acc9047de3f5e05ba7fe5280df92db TN: PC20-040 (cherry picked from commit c825ab1)
1 parent 410c69c commit 1be09f0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tools/gnatcov/annotations-dynamic_html.adb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ package body Annotations.Dynamic_Html is
358358
("coverage_level", String'(Source.Get ("coverage_level")));
359359
Simplified.Set_Field
360360
("hunk_filename", String'(Source.Get ("hunk_filename")));
361+
Simplified.Set_Field
362+
("missing_source", Boolean'(Source.Get ("missing_source")));
361363

362364
if Source.Has_Field ("project") then
363365
-- Project name is optional. Add it only when relevant
@@ -397,15 +399,10 @@ package body Annotations.Dynamic_Html is
397399
Clear (Pp.Current_Decisions);
398400
Clear (Pp.Current_Conditions);
399401

400-
if not Info.Has_Source then
401-
Skip := True;
402-
return;
403-
end if;
404-
405402
Skip := False;
406403

404+
Source.Set_Field ("missing_source", not Info.Has_Source);
407405
-- Compute the coverage stats and store them into a JSON dictionary
408-
409406
Stats.Set_Field ("no_code", Info.Stats (No_Code));
410407
Stats.Set_Field ("covered", Info.Stats (Covered));
411408
Stats.Set_Field ("partially_covered", Info.Stats (Partially_Covered));

0 commit comments

Comments
 (0)