Changes in Clover-for-Ant 3.1.10
January 8, 2013
This is a bug fix release which addresses issues found in 3.1.8 and earlier versions of Clover-for-Ant.
1) Two new metrics have been implemented for method context filter:
These two metrics calculate method statements/complexity including the code of all anonymous inline classes declared inside the method. Thanks to this it is possible to distinguish between trivial single-statement methods like:
and single-statement methods which actually return more complex data, like:
In the code sample above, the getListener() method has only one statement: "return new ActionListener()". If you would use a method context filter with maxStatements attribute, like:
then the whole method would be filtered-out (because it contains one "return" statement). If you would use new maxAggregatedStatements, for instance:
then the getListener() method would not be filtered out (because it contains 4 statements in total - 1 "return" statement from the method itself and 3 "System.out.println()" statements from anonymous class).
2) The <testsources> tag from <clover-setup> task is now passed to <groovyc> Ant task. Thanks to this you can define custom test detection rules for Groovy code. See clover-setup task for more details.
JIRA issue list
See also change log for Clover-for-Maven, Clover-for-Eclipse, Clover-for-IDEA.