report (element)

Description

The report element, which must be nested within the instantiations.audit (or codepro.audit) task, is used to generate a report based on the results of the audit.

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 audit 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 audit results will be written. If not specified, then the results will be written in a simple text format. Currently supported formats include:

  • commaSeparatedData
  • csvSummary
  • html
  • tabSeparatedData
  • text
  • xml
No, default is text
generateResourcePages

A flag used to control whether additional pages will be generated for violated resources that contain additional information about the violations within those resources. If true, these pages will be reachable from the main report page by clicking on the individual violations.

No, default is false
groupBy

The way in which the audit violations are grouped in the result file. If not specified, then the results will be grouped by audit rule. Currently supported groupings include:

  • audit rule
  • audit rule group
  • author
  • resource
  • severity
No, default is audit rule
filter

The filter used to restrict which violations are included in the report that is generated. Only those violations whose severity level is included in the given plus ("+") separated list will be included in the generated report. If this attribute is not specified, all severities of violations will be included in the report.

No
showRecommendations

A flag used to control whether recommendations are included in the report. The default value is taken from the workbench in which the audit was run. If the workspace has not been configured differently, the default is "true".

No
showSeverities

A flag used to control whether the severities of the violations are included in the report. The default value is taken from the workbench in which the audit was run. If the workspace has not been configured differently, the default is "true".

No
showProject

A flag used to control whether a column containing the name of the project containing the violated resource should be included in the report. The default value is taken from the workbench in which the audit was run. If the workspace has not been configured differently, the default is "false".

No
resourceNameFormat

The format of the resource name as it will appear in the report. Currently supported formats include:

  • simple - the unqualified name of the resource
  • project - the path to the resource relative to the project
  • workspace - the path to the resource relative to the workspace
  • absolute - the absolute path to the resource
No, default is simple

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 "code_audit_result.xml" with the violations grouped by audit rule.

<report
      file="code_audit_result.xml"
      format="xml"
      groupBy="audit rule"/>