Instrument Groovy traits and show code coverage for them

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Won't Fix
    • open-source
    • Component/s: Groovy
    • None

      Current status

      Groovy 2.3 introduced traits - a code construct for composition of behaviours:

      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 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).

      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

              Assignee:
              Unassigned
              Reporter:
              Marek Parfianowicz (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: