Skip to content

Fix variable name in CoberturaParser#780

Merged
danielpalme merged 2 commits intodanielpalme:mainfrom
lorenz-ammersbach:main
Mar 31, 2026
Merged

Fix variable name in CoberturaParser#780
danielpalme merged 2 commits intodanielpalme:mainfrom
lorenz-ammersbach:main

Conversation

@lorenz-ammersbach
Copy link
Copy Markdown
Contributor

Currently, branches are only determined from lines outside of methods which doesn't seem to make much sense as that number is usually zero. With this tiny fix, all lines are considered for branch coverage.

@danielpalme danielpalme merged commit 858a16b into danielpalme:main Mar 31, 2026
4 of 6 checks passed
@danielpalme
Copy link
Copy Markdown
Owner

danielpalme commented Mar 31, 2026

I had to make some adjustments in your code changes in order to compile.

For most Cobertura files the change will not make any difference. Because the line elements appear twice in the XML report (Example).

There was an issue (#603) for files generated by Jest. Here some lines did only appear once.
Therefore the additionalLinesInMethodElement variable was introduced.

Now all elements are also used to determine branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants