This is the documentation for Clover 3.3. View this page for the

Unknown macro: {spacejump}

of Clover, or visit the latest Clover documentation.

Changes in Clover-for-Ant 3.1.10

2013 年 1 月 8 日

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:

  • maxAggregatedStatements
  • maxAggregatedComplexity

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:

int getNumber() { 
   return this.number;
}

and single-statement methods which actually return more complex data, like:

ActionListener getListener() {
   return new ActionListener() {
       public void actionPerformed(ActionEvent e) {
           System.out.println("statement #1");
           System.out.println("statement #2");
           System.out.println("statement #3");
       }
   }; 
}

 

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:

<methodContext name="trivial" regexp=".*" maxStatements="1">

then the whole method would be filtered-out (because it contains one "return" statement). If you would use new maxAggregatedStatements, for instance:

<methodContext name="trivial" regexp=".*" maxAggregatedStatements="1">

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

type 鍵 (キー) 要約 優先度

予期しないエラーのため、データを取得できません。

Jira でこれらの課題を表示する

See also change log for Clover-for-Maven, Clover-for-Eclipse, Clover-for-IDEA.

  • ラベルなし