report (element)

Description

The report element, which must be nested within the codepro.metrics task, is used to generate a report based on the results of the metric computation.

Attributes

The following attributes are used to control the report generation process.

Attribute Description Required
file

The absolute or relative path to the file to which metric results will be written. If this attribute is not specified then the report will not be saved to a file. Omitting the file path makes sense only if the mail sub-element is specified.

No
format

The format in which the metric results will be written. If not specified, then the results will be written in a simple text format. Currently supported formats include:

  • commaSeparatedData
  • html
  • tabSeparatedData
  • text
  • xml
No, default is text
includeSubScopes

A boolean value indicating whether or not sub-scopes should be included in the results.

No
includeTypeLevelMetrics

A boolean value indicating whether or not type-level metrics should be included in the results.

No
includeDetails

A boolean value indicating whether or not details should be included in the results.

No
includeViolationSummary

A boolean value indicating whether or not a violation summary should be included in the results.

No

Nested Elements

The following elements can be nested within the report element:

<mail>

The mail element is used to send the generated report as an attachment in an e-mail message.

Examples

The following report element will generate an XML report to the file named "metrics_result.xml".

<report
      file="metrics_result.xml"
      format="xml"/>