Skip to content

Commit

Permalink
#485: Coberatura: Fixed special file format
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpalme committed Feb 10, 2022
1 parent 0b9e546 commit 4a38420
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ CHANGELOG
5.0.4.0

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

5.0.3.0

Expand Down
4 changes: 3 additions & 1 deletion src/ReportGenerator.Core/Parser/CoberturaParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ private static Dictionary<int, ICollection<Branch>> GetBranches(IEnumerable<XEle

foreach (var line in lines)
{
if (line.Attribute("branch") == null || !line.Attribute("branch").Value.Equals("true", StringComparison.OrdinalIgnoreCase))
if (line.Attribute("condition-coverage") == null
|| line.Attribute("branch") == null
|| !line.Attribute("branch").Value.Equals("true", StringComparison.OrdinalIgnoreCase))
{
continue;
}
Expand Down

0 comments on commit 4a38420

Please sign in to comment.