Preserve information about covered branches for lines of methods #1680
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is needed for at least the following two use cases.
First - in combination with #1670 this allows to calculate branch coverage for Kotlin inline functions.
Second - this information can be shown to users.
This feature exists in IntelliJ IDEA when using https://github.com/JetBrains/intellij-coverage
Based on these changes @zuevmaxim from JetBrains kindly prepared PoC that enables this feature when using JaCoCo in IntelliJ IDEA - https://github.com/Godin/intellij-community/tree/jacoco_branches
Here is how it looks:
And maybe in the future somebody will use this to implement similar feature in https://github.com/eclipse-eclemma/eclemma for Eclipse IDE.