Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve information about covered branches for lines of methods #1680

Draft
jacoco:master
base: master
Choose a base branch
from

Conversation

Godin
Copy link
Member

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:

Screenshot 2024-08-10 at 00 37 38

And maybe in the future somebody will use this to implement similar feature in https://github.com/eclipse-eclemma/eclemma for Eclipse IDE.

@marchof
Copy link
Member

marchof commented Oct 17, 2024

As discussed at BaselOne:

  • We should add the new capabilities to the API
  • This only makes sense for methods. Therefore a new IMethodLine extends ILine type should be designed
  • To make memory optimization transparent to the callers the append() methods should return the new instance to work with.
  • There should be only one append() method for LineImpl and MethodLineImpl which needs to be called on the respective use case.

force-pushed the branches branch 2 times, most recently from f780f27 to 1094c81 Compare November 17, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implementation
Development

Successfully merging this pull request may close these issues.

2 participants