Including Squore Data

Charts

The Charts element lists the dashboard charts that will be printed in the report.

The Charts element has one or more chart sub-elements. The charts available for reports are the same as the charts used for dashboards. See Charts area for a complete list of available charts.

<Bundle xmlns:xi="http://www.w3.org/2001/XInclude">
	<Report ... type="APPLICATION;FILE">
		<Charts displayComments="true">
			<xi:include href="../../Analysis/key_performance_indicator.xml"/>
			<xi:include href="../../Analysis/Code/ISO9126_Maintainability/MaintainabilityKiviat.xml"/>
		</Charts>
		...
	</Report>
</Bundle>

The attributes allowed for the Charts element are the following:

  • displayComments(optional, default: false): to include the chart’s comments in the report.

  • freeSelection(optional, default: false): to allow including additional charts dynamically from the GUI.

Tables

Tables lists the scorecard tables that will be included in the report.

The Tables element has one or more table sub-elements. You can use the tables created for the dashboard or create a table that is not included in any dashboard. Refer to Scorecard tables for a complete reference about tables.

<Bundle xmlns:xi="http://www.w3.org/2001/XInclude">
	<Report ... >
		...
		<Tables>
			<xi:include href="../Dashboards/tables/line_counting.xml" />
			<xi:include href="../Dashboards/tables/dates.xml" />
		</Tables>
		...
	</Report>
</Bundle>

The attributes allowed for the Tables element are the following:

  • freeSelection(optional, default: false): to allow including additional tables dynamically from the GUI.

Measures, Indicators and Information

Using the Measures, Indicators and Infos elements in your report definition, you can output any metric from your model in your report. Each element takes a ids attribute which contains a semicolon-separated list of IDs for the metrics you want to include. When including an indicator, the measure associated to the indicator is also automatically included.

<Bundle xmlns:xi="http://www.w3.org/2001/XInclude">
	<Report ... >
		...
		<Measures ids="VG;TECH_DEBT" />
		<Indicators ids="CPXT" />
		<Infos ids="NAME;BUILD_TIME" />
		...
	</Report>
</Bundle>

Using these elements at Report level exports the metrics for the current artefact. You can also extract information for child artefacts by including the Measures, Indicators and Infos in a SubArtefacts section of the report, as described in Including Child Artefacts Data.

Action Items

Using the Data element in the report bundle, it is possible to include action items with the DefectReports sub-element. As follows:

<Bundle xmlns:xi="http://www.w3.org/2001/XInclude">
	<Report ... >
		...
		<Data>
			<DefectReports id="WORST" />
		</Data>
	</Report>
</Bundle>

Action Items are sorted in the same way as in the user interface, which you can customise for each model by following the procedure described in Configuring sorting order.

The attributes allowed for the DefectReports element are the following:

  • id (mandatory) is a unique identifier for the list of action items.

  • withReasons (optional, default: true) defines whether Action Items are reported with their reasons (true) or not (false). Note that including reasons has an impact on performance when generating the report.

Findings

Using the Data element in the report bundle, it is possible to include violations and practices with the Findings sub-element, as well as relaxed findings with the FindingOccurrences sub-element. As follows:

<Bundle xmlns:xi="http://www.w3.org/2001/XInclude">
	<Report ... >
		...
		<Data>
			<Findings id="VIOLATIONS" />
			<Findings id="PRACTICES" type="ALL_PRACTICE" />
			<FindingOccurrences id="RELAXED_FINDINGS" relaxationState="RELAXED" />
		</Data>
	</Report>
</Bundle>

Findings are sorted in the same way as in the user interface, which you can customise for each model by following the procedure described in Configuring sorting order.

The attributes allowed for the Findings element are the following:

  • id (mandatory) is a unique identifier for the list of findings.

  • type (optional, default value: NO_FILTER) is the filter to apply to the findings list. The following values are accepted, so you can generate the same lists as in the web interface:

    • NO_FILTER

    • LOST_PRACTICE

    • ACQUIRED_PRACTICE

    • DETERIORATED_PRACTICE

    • IMPROVED_PRACTICE

    • ALL_PRACTICE

The attributes allowed for the FindingOccurrences element are the following:

  • id (mandatory) is a unique identifier for the list of relaxed findings occurrences.

  • relaxationState (mandatory) is the filter to apply to the findings occurrences list. The following values are accepted, so you can generate the same lists as in the web interface:

    • RELAXED

    • RELAXED_DEROGATION

    • RELAXED_LEGACY

    • RELAXED_FALSE_POSITIVE

Highlights

Using the Data element in the report bundle, it is possible to include highlights with the Highlights sub-element. As follows:

<Bundle xmlns:xi="http://www.w3.org/2001/XInclude">
	<Report ... >
		...
		<Data>
			<Highlights id="TOP_10_WORST_FILE" filterId="TOP_10_WORST_ARTEFACTS" />
		</Data>
	</Report>
</Bundle>

The attributes allowed for the Highlights element are the following:

  • id (mandatory) is a unique identifier for the highlight category.

  • filterId (mandatory) is the id of the highlight category to include in your report (as defined in the Highlights bundle in your model)

Artefacts

Using the Data element in the report bundle, it is possible to include artefacts with the Artefacts sub-element. As follows:

<Bundle xmlns:xi="http://www.w3.org/2001/XInclude">
	<Report ... >
		...
		<Data>
			<Artefacts id="RELAXED_ARTEFACTS" relaxationState="RELAXED" />
			<Artefacts id="EXCLUDED_ARTEFACTS" relaxationState="EXCLUDED" />
		</Data>
	</Report>
</Bundle>

The attributes allowed for the Artefacts element are the following:

  • id (mandatory) is a unique identifier for the list of artefacts.

  • relaxationState (mandatory) defines the relaxation status of the artefacts to include in the list. The following values are accepted:

    • RELAXED

    • EXCLUDED