Add "generated" annotations for Jacoco
See original GitHub issueWhat is your use-case and why do you need this feature?
kotlinx.serialization generates methods like patch
and getDescriptor
, which are then flagged by Jacoco as not having code coverage.
Describe the solution you’d like kotlinx.serialization generates annotations on these methods, which cause Jacoco to filter them: https://groups.google.com/g/jacoco/c/wrXjfq-NmfY/m/WXv4XuXmAAAJ
Issue Analytics
- State:
- Created 3 years ago
- Reactions:23
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Generated annotation filter detection does not work ... - GitHub
the docs says Generated annotation is detected if it is visible or invisible. That is kind of confusing. I thought SOURCE retention would...
Read more >Add @Generated annotation to generated code : KT-18714
This would help tooling such as JaCoCo recognize that such code was automatically generated by the compiler, and should be excluded from code...
Read more >java - How would I add an annotation to exclude a method ...
You can create any annotation with name containing "Generated". I've created the following in my codebase to exclude methods from being included ...
Read more >Exclusions from Jacoco Report - Baeldung
Basically, this property adds the lombok.@Generated annotation to the relevant methods, classes, and fields of all the classes annotated ...
Read more >Filter out classes from JaCoCo report using annotaitons
We found out that JaCoCo team in order to support Lombok added a filter which doesn't count coverage of @Generated annotated classes/methods.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Breaks migration from jackson to serialization. Because no one will accept such degradation in code coverage measured by jacoco
write$self
method and$serializer
class are markedACC_SYNTHETIC
via f4845b8d. Expected in Kotlin1.8.20