Hi Martin,
thanks for your work on the filtering story! All of the functionality
you implemented should make it into JaCoCo. as mentioned I have some
concerns with the implementation. But this is definitely not your fault!
For a clean implementation of filtering it is probably required to
change the internal processing in the flow/anayzer packages. I will need
to find more time to discuss the details, just some concerns about the
current implementation:
* Filtering should be an public API which allows others to implement
new filters beside default filters provided with JaCoCo (through the
same API -> "eat your own dowgfood" principle).
* I consider the probe insertion mechanism as an implementation
detail, therefore e.g. MethodProbesVisitor should not be exposed in this
public API
* The "finally block duplication" is just another filter and must not
be coded into the analyzer.
BTW, I detailed some filter specs for in the Wiki:
https://github.com/jacoco/jacoco/wiki/FilteringOptions
Best regards,
-marc
On 2013-01-14 09:32, Martin Hare Robertson wrote:
> Hi Marc, Evgeny,
>
> As you know, I have been working on a fork of JaCoCo/EclEmma which
> adds some infrastructure for filtering code coverage along with some
> specific filters. I would like to discuss contributing some/all of
> these changes back to core JaCoCo.
>
> At a high level my changes can be split into the following parts:
>
> * Coverage filter API
> * Enabled by default filters:
> ** Synchronized exit
> ** Enum default methods
> ** Empty no-args constructor
> * Optional filters:
> ** Source directives filter
> * Finally block de-duplication
>
> I have written about my changes:
>
> * Project site:
http://mchr3k.github.com/jacoco/ [1]
> [2]
> **
>
>
http://mchr3k-coding.blogspot.com/2013/01/java-bytecode-finally-blocks.html
> [3]
> **
>
>
http://mchr3k-coding.blogspot.co.uk/2013/01/improving-finally-block-handling.html
> [4]
>
> Which pieces of my fork are you happy to accept? I should put these
> together into a pull request.
>
> Which pieces of my fork are you unconvinced about? We should discuss
> these.
>
> Are there any pieces which you explicitly don't want to accept into
> core JaCoCo? I would like to avoid this but I suspect the source
> directives filter and/or finally block dedup might fall under here.
> We
> should also discuss these.
>
> Martin
>
> --
>
>
>
> Links:
> ------
> [1]
http://mchr3k.github.com/jacoco/
> [2]
>
>
http://mchr3k-coding.blogspot.com/2013/01/java-code-coverage-filtering-out-noise.html
> [3]
>
>
http://mchr3k-coding.blogspot.com/2013/01/java-bytecode-finally-blocks.html
> [4]
>
>
http://mchr3k-coding.blogspot.co.uk/2013/01/improving-finally-block-handling.html