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

Unknown macro: {spacejump}

of Clover, or visit the latest Clover documentation.

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 bar above, except 200px wide
  • % — The coverage percentage value

Note that bar and % are not valid formats for total columns.

All column elements also take max and/or 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

avgClassesPerFile

The average number of classes per file.

raw

avgMethodComplexity

The average number of paths per method.

raw

avgMethodsPerClass

The average number of methods per class.

raw

avgStatementsPerMethod

The average number of statements per method.

raw

complexity

Cyclomatic Complexity is a measure of the number of paths in your code.

raw

complexityDensity

The average complexity per statement.

raw

coveredBranches

The amount of covered branches.

raw;bar;%;longbar

coveredElements

The total number of covered elements (branches + statements) in the project.

raw;bar;%;longbar

coveredMethods

The amount of covered methods.

raw;bar;%;longbar

coveredStatements

The amount of covered statements.

raw;bar;%;longbar

expression

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.

raw

filteredElements

The amount of elements that have been filtered out of the report.

raw;bar;%;longbar

ncLineCount

The total number of non-comment lines.
(info) When using Clover on Groovy source code, this column consistently reports '0' at the moment.

raw

lineCount

The total number of lines.

raw

SUM

Scientifically Untested Metric. This is very similar to crap4j and is defined by this expression:

complexity^2 * ((1 - %coveredElements/100)^3) + complexity

raw

percentageCoveredContribution

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.

raw;bar;%;longbar

percentageUncoveredContribution

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.

raw;bar;%;longbar

totalBranches

The total number of branches in the project.

raw

totalChildren

The number of lower order elements. The order of elements is: Project, Package, File, Class, Method, Statement

raw

totalClasses

The total number of classes below the package, project or file.

raw

totalElements

The total number of elements (branches + statements) in the project.

raw

totalFiles

The total number of files below the package or project.

raw

totalMethods

The total number of methods in the project.

raw

totalPercentageCovered

The total coverage.

raw;bar;%;longbar

totalStatements

The total number of statements in the project.

raw

uncoveredBranches

Branches that were not executed.

raw;bar;%;longbar

uncoveredElements

Elements that were not executed.

raw;bar;%;longbar

uncoveredMethods

Methods that were not executed.

raw;bar;%;longbar

uncoveredStatements

Statements that were not executed.

raw;bar;%;longbar

 

Column Attributes

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 raw, bar, % or longbar.

いいえ。

min

Sets a minimum threshold on the value of the column. If the value is less than this it will be highlighted.

いいえ。

max

Sets a maximum threshold on the value of the column. If the value is greater than this it will be highlighted.

いいえ。

scope

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

Example:

<columns>
  <expression title="SUM">complexity^2 * ((1 - %coveredElements/100)^3) + complexity</expression>
</columns>
  • ラベルなし