Specifies the data columns to be included on summary pages. If not specified, default columns will be output.
Specific columns are defined as sub-elements to this one. See the clover-report.
Columns can be defined in a <clover-columns/> Ant type for referencing elsewhere in the build file.
Each column element takes an optional
format attribute which determines how the column's value is rendered. The
format attribute may be one of the following:
raw— the actual value. Always used for total columns
bar— render a bar chart (40px wide) showing the coverage percentage
longbar— same as
barabove, except 200px wide
%— The coverage percentage value
% are not valid formats for total columns.
All column elements also take
min threshold attributes. If the value for the column is outside the threshold, the value will be highlighted.
Table of Column Names
Valid Format Attributes
The average number of classes per file.
The average number of paths per method.
The average number of methods per class.
The average number of statements per method.
Cyclomatic Complexity is a measure of the number of paths in your code.
The average complexity per statement.
The amount of covered branches.
The total number of covered elements (branches + statements) in the project.
The amount of covered methods.
The amount of covered statements.
The body of this element will be evaluated as an arithmetic expression. All other column names can be referenced. See Clover EL. This column takes an optional title attribute.
The amount of elements that have been filtered out of the report.
The total number of non-comment lines.
The total number of lines.
Scientifically Untested Metric. This is very similar to crap4j and is defined by this expression:
complexity^2 * ((1 - %coveredElements/100)^3) + complexity
Helps you to work out how much an individual package, file or class contributes (percentage-wise) to the overall number of covered elements in the project. Useful for spotting quick wins.
Helps you to work out how much an individual package, file or class contributes (percentage-wise) to the overall number of uncovered elements in the project. Useful for spotting quick wins.
The total number of branches in the project.
The number of lower order elements. The order of elements is: Project, Package, File, Class, Method, Statement
The total number of classes below the package, project or file.
The total number of elements (branches + statements) in the project.
The total number of files below the package or project.
The total number of methods in the project.
The total coverage.
The total number of statements in the project.
Branches that were not executed.
Elements that were not executed.
Methods that were not executed.
Statements that were not executed.
Each of the above column elements can take the following attributes:
Determines how the value is rendered. Depending on the column, this may be one of
Sets a minimum threshold on the value of the column. If the value is less than this it will be highlighted.
Sets a maximum threshold on the value of the column. If the value is greater than this it will be highlighted.
Controls at which level in the report the column will appear. The scope attribute can be one of: "package", "class" or "method". If omitted, the column will be used at every level in the report. Note that only the following columns support the scope attribute: expression, complexity, complexityDensity, coveredXXX, uncoveredXXX and totalXXX.
Clover Expression Language
Clover Expression Language enables you to combine any of Clover's built-in column types to produce a custom column. The following arithmetic operators are available: +, - , *, /, ^, (). Any of Clover's columns may be referenced.
A percentage sign, '%', before a column identifier will evaluate to the percentage of that columns data, rather than its raw value. e.g. %CoveredElements == (CoveredElements/TotalElements) * 100
<columns> <expression title="SUM">complexity^2 * ((1 - %coveredElements/100)^3) + complexity</expression> </columns>