Skip to content

Commit

Permalink
html: Add column with uncovered lines
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed Jun 6, 2014
1 parent ada5577 commit bc471e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
<table width="80%" cellpadding="2" cellspacing="1" border="0" id="index-table" class="tablesorter">
<thead>
<tr>
<th class="tableHead" width="60%">Filename</th>
<th class="tableHead" width="50%">Filename</th>
<th width="20%">Coverage percent</th>
<th width="10%">Covered</th>
<th width="10%">Covered lines</th>
<th width="10%">Uncovered lines</th>
<th width="10%">Executable lines</th>
</tr>
</thead>
Expand All @@ -59,6 +60,7 @@
<td class="coverFile"><a href="{{link}}" title="{{title}}">{{summary_name}}</a></td>
<td class="{{coverage_perc}}"><span style='background-color:{{covered_color}};display:block;width:{{covered}}%'>{{covered}}%</td>
<td class="{{coverage_num}}">{{covered_lines}}</td>
<td class="{{coverage_num}}">{{uncovered_lines}}</td>
<td class="{{coverage_num}}">{{total_lines}}</td>
</tr>
</tbody>
Expand Down
4 changes: 4 additions & 0 deletions src/html-writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class HtmlWriter : public WriterBase
"'covered_color':'%s',"
"'covered':'%.1f',"
"'covered_lines':'%d',"
"'uncovered_lines':'%d',"
"'total_lines' : '%d'},\n",
file->m_outFileName.c_str(),
file->m_fileName.c_str(),
Expand All @@ -201,6 +202,7 @@ class HtmlWriter : public WriterBase
colorFromPercent(percent).c_str(),
percent,
nExecutedLines,
nCodeLines - nExecutedLines,
nCodeLines
);
}
Expand Down Expand Up @@ -302,6 +304,7 @@ class HtmlWriter : public WriterBase
"'covered_color':'%s',"
"'covered':'%.1f',"
"'covered_lines':'%d',"
"'uncovered_lines':'%d',"
"'total_lines' : '%d'},\n",
de->d_name,
name.c_str(),
Expand All @@ -310,6 +313,7 @@ class HtmlWriter : public WriterBase
strFromPercentage(percent).c_str(),
colorFromPercent(percent).c_str(),
percent,
summary.m_lines - summary.m_executedLines,
summary.m_executedLines,
summary.m_lines
);
Expand Down

0 comments on commit bc471e0

Please sign in to comment.