Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 939ec80

Browse files
committed
Updated XSL for ReportGenerator
The newer releases of ReportGenerator have summary values in LineCoverage/BranchCoverage instead of Coverage. Calculate the value directly in the XSL to work with both variants.
1 parent 0b63a2c commit 939ec80

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

project/xsl/ReportGenerator.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
Coverage:
5353
</td>
5454
<td>
55-
<xsl:value-of select="Summary/Coverage"/>
55+
<xsl:value-of select="format-number(Summary/Coveredlines div Summary/Coverablelines, '0.0%')"/>
5656
</td>
5757
</tr>
5858
<tr>

project/xsl/ReportGeneratorSummary.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
Total
3737
</td>
3838
<td class="header-label">
39-
<xsl:value-of select="Summary/Coverage"/>
39+
<xsl:value-of select="format-number(Summary/Coveredlines div Summary/Coverablelines, '0.0%')"/>
4040
</td>
4141
<td class="header-label">
4242
95%
4343
</td>
4444
<td class="header-label">
4545
<xsl:choose>
46-
<xsl:when test="substring-before(Summary/Coverage,'%') &lt; 95">
46+
<xsl:when test="(Summary/Coveredlines div Summary/Coverablelines) &lt; 0.95">
4747
<span style="color:red">FAIL</span>
4848
</xsl:when>
4949
<xsl:otherwise>

0 commit comments

Comments
 (0)