Skip to content

Commit 4a38420

Browse files
committed
#485: Coberatura: Fixed special file format
1 parent 0b9e546 commit 4a38420

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ CHANGELOG
6767
5.0.4.0
6868

6969
* Fix: #482: Fixed incorrect shadow text in badges
70+
* Fix: #485: Coberatura: Fixed special file format
7071

7172
5.0.3.0
7273

src/ReportGenerator.Core/Parser/CoberturaParser.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,9 @@ private static Dictionary<int, ICollection<Branch>> GetBranches(IEnumerable<XEle
375375

376376
foreach (var line in lines)
377377
{
378-
if (line.Attribute("branch") == null || !line.Attribute("branch").Value.Equals("true", StringComparison.OrdinalIgnoreCase))
378+
if (line.Attribute("condition-coverage") == null
379+
|| line.Attribute("branch") == null
380+
|| !line.Attribute("branch").Value.Equals("true", StringComparison.OrdinalIgnoreCase))
379381
{
380382
continue;
381383
}

0 commit comments

Comments
 (0)