The QA Reports package provides four PRQA Standard HTML and XHTML reports for QA·C and QA·C++
From the command line:
Usage:
qar <product> -cmaf <file> [options...] f1...fn qar <product> -cmaf <file> [options...] -list filelist
e.g.
qar %Q %P+ %L+
Return codes:
0 | No error | |
10 | Configuration error | |
19 | Run-time error |
From the GUI:
The options should be placed as arguments to the QAR program, following the basic parameters: qar %Q %P+ %L+
.
For QAC-7.0 and QACPP-2.3 onward, QAR options are created as Custom Report parameters (Custom Reports is under Reports on the GUI menu bar).
QAR accepts QA·C and QA·C++ options, e.g. 'product' (specified using the %Q
symbol), analysis options e.g. -via settings.via
(specified using the %P+
symbol), file list e.g. -list filelist.lst
(specified using the %L+
symbol).
QAR also accepts report specific options specified using -po
and parameter. e.g. -po qar::report_type=Code\ Review\ Report
Report options are specified either as generic report options introduced by -po qar::...
, or standard report specific options which are introduced by -po
followed by an argument which begins with the name of the report, e.g. -po Code\ Review\ Report::...
Some options are Boolean, i.e. they enable an option. Absence of these options indicates that the option is disabled. Other options can specify a value, or a set of values.
Boolean options toggle an option which is not selected by default, e.g.
-po Code\ Review\ Report::no_calls
This will result in the Code Review Report not including the function call tree diagram in the report.
Value options are set using the equals sign, e.g.
-po Quality\ Report::bar_style=diamond
This causes the Quality Report to use diamond shaped symbols in its metric charts.
Set of values options are set by specifying the values in square brackets, separated by commas. Each value must be enclosed in single quotes. e.g.
-po Code\ Review\ Report::file_metric=['STCYC','STPTH']
This causes the Code Review Report to show STCYC and STPTH file metrics.
As mentioned above there are two classes of -po
option. The generic options introduced by -po qar::...
, and the report specific options, e.g. -po Quality\ Report::...
. The generic options are used as parameters to QAR for all reports, they are as follows:
-po qar::title=<document title for front page>
-po qar::project_name=<project name for front page>
-po qar::date_type=UK
-po qar::date_type=US
-po qar::logo_file=<path of file>
-po qar::no_appendix
-po qar::no_version
-po qar::output_path=<path for result files>
-po qar::op=<path for result files>
-po qar::report_format=<html|xhtml>
-po qar::report_type=Code\ Review\ Report
-po qar::report_type=Compliance\ Report
-po qar::report_type=Quality\ Report
-po qar::report_type=Suppression\ Report
-po qar::user_reports_dir=<path of folder containing report programs>
-po qar::ud=<path of folder containing report programs>
-po qar::viewing_program=<path of program>
-po qar::prdf2target_xsl_file=<path of file>
The qar::title
option specifies the title written on the front page of the generated report. e.g.
-po qar::title=My\ Code\ Review\ Document
The qar::project_name
option specified the name of the PRQA project written on the front page of the generated report. e.g.
-po qar::project_name=%J
The qar::date_type
option may be specified either as UK or US and controls the format of the date written on the front page of the generated report. e.g.
-po qar:date_type=UK
The qar::logo_file
option specifies the full path of an image file to be incorporated on the front page of the generated report. e.g.
-po qar::logo_file=file:////some_dir/PRQA/QAR-1.2/bin/prqa_logo.png
The qar::no_appendix
option specifies that the generated report shall not include any appendices. e.g.
-po qar::no_appendix
The qar::no_version
option specifies that the generated report shall not contain generator program version information. e.g.
-po qar::no_version
The qar::output_path
option or its abbreviated form: qar::op
, specify the full path to the directory where that generated report shall be written. e.g.
-po qar::output_path=/MyProject/output
-po qar::op=/MyProject/output
If omitted the qar::output_path
defaults to the directory specified by the supplied cmaf
option.
The qar::report_format
option specifies the format of the generated report as either html
or xhtml
. This value shall agree with the browser type being used to render the report. If the browser is IE8 or later, the output format shall be html
and will default to this. If the browser is anything other than IE8 (or later), the output format shall be xhtml
and will default to this. e.g.
-po qar::report_format=html
The qar::report_type
option specifies the kind of report to be generated. This shall be one of the following four alternatives:
-po qar::report_type=Code\ Review\ Report
-po qar::report_type=Compliance\ Report
-po qar::report_type=Quality\ Report
-po qar::report_type=Suppression\ Report
The qar::user_reports_dir
option or its abbreviated form: qar::ud
, specify the full path to the directory which contains the report template file to be used to generate the report. e.g.
-po qar::user_reports_dir=/some_dir/PRQA/QAR-1.2/standard_reports
-po qar::ud=/some_dir/PRQA/QAR-1.2/standard_reports
For QAR release 1.2, qar::user_reports_dir
is set to the directory that contains the Standard Reports. As QAR release 1.2 only provides Standard Reports, this is <QAR Home>/standard_reports
. Subsequent versions of QAR allow the User to specify a directory of his own choice. This directory shall contain the ...Report.template.xml
files.
The qar::viewing_program
option specifies the full path of the browser to be used to render the generated report. e.g.
-po qar::viewing_program=/usr/bin/mozilla
If omitted QAR defaults to the browser specified in the QA·C or QA·C++ GUI.
If set to none then QAR does not render the report in any GUI. e.g.
-po "qar::viewing_program=none"
The qar::prdf2target_xsl_file
option specifies the full path of the XSL transform file to be used to generate the report. For report_format=html
this defaults to the file <QAR Home>/prdf/transforms/prdf2html.xsl
. For report_format=xhtml
this defaults to the file <QAR Home>/prdf/transforms/prdf2xhtml.xsl
. e.g.
-po qar::prdf2target_xsl_file=/MyTransforms/prdf2pdf.xsl
CR-13897: -po options in the Project Configuration File (.pcf) are now listed in report summaries. Note qar filters out non report -po options supplied on its command line.
Built to use QAC-8.0 compatible .err file.
CR-14263: Reworked to reduce xhtml/html file sizes (found to be too big for browsers to open when project is large).
CR-14575: Windows installer updated to write to Registry only. Windows installer no longer tests for QA·C/QA·C++ presence when installing and does not write to analyser .ini file.
TSR-10940: QAR browser opening mechanism updated.
CR-14072: Correct QAR failure if unable to find qac[pp].ini, .xqacrc, or any .err or .met are missing.
CR-15613: Code Review Report indentation of subtitles corrected.
CR-15622: QAR updated to handle relative -cmaf path.
CR-15623: -po "qar::viewing_program=none" accepted in order to suppress output.
PR-16123: File name mangling corrected for file names with embedded separators.
PR-15568: 64bit Version.