Project: clover
Issue CLOV-1960: Instrument Groovy traits and show code coverage for them
*Current status* Groovy 2.3 introduced traits - a code construct for composition of behaviours: * http://docs.groovy-lang.org/latest/html/documentation/core-traits.html Currently Clover handles them like an interface - it records the class name in a database but it does not instrument the class, so it shows no code coverage in reports for them. Side note: Clover's reports by default do not show classes containing no executable code (empty classes, plain enums, interfaces with no default methods, traits) - you can show them by setting [showEmpty=true|https://confluence.atlassian.com/display/CLOVER/clover-report] parameter. *Proposed improvement* Instrument Groovy traits like normal classes or enums. Side note: Groovy 2.5 will probably not introduce interfaces with default methods (like in Java 8). * http://docs.groovy-lang.org/next/html/documentation/#_interface *Technical obstacles* * method '$CLV_R$' is private but should be public in a trait * method 'com_atlassian_clover.CoverageRecorder $CLV_R$()' must not be static; only fields may be static in a trait * field '$CLV_R$' is not 'public static final' in a trait
Story points: 8