After generating and viewing metrics from your analysis results, you can review the results in greater detail.
To focus your review, you can:
Define quality objectives that you or developers in your organization must meet.
Apply the quality objectives to your analysis results.
Review only those results that fail to meet those objectives.
By default, the software quality objectives are turned off. To apply quality objectives:
In the Polyspace® Metrics interface, open the metrics page for a project.
From the Quality Objectives list
in the upper left, select
A new group of Software Quality Objectives columns appears.
The Overall Status column shows the last used quality objective level to generate a status of PASS or FAIL for your results.
The Level column shows the quality objective level.
To change your quality objective level, in this column, select a cell. From the drop-down list, select a quality level. For more information, see Bug Finder Quality Objective Levels.
For files with an Overall Status of FAIL, to see what causes the failure, view the entries in the other Software Quality Objectives columns. The failing levels are marked red.
If the icon appears next to
the status, it means that Polyspace does not have enough information
to compute the status. For instance, if you specify
certain coding rules must be review. But, if you do not check coding
rules during the analysis, Polyspace cannot determine whether
your project satisfies the coding rule objectives specified in
To investigate the failing quality objectives, select the entries marked red for more details.
On the Code Metrics, Coding Rules, or Bug-Finder tab,
Select the red column entries to download the results.
Review the violations and fix or justify the results.
Upload your new justifications to the Polyspace Metrics web dashboard.
After your review, in the Polyspace Metrics interface, click to view the updated metrics.
If you change your code, to update the metrics, rerun your analysis and upload the results to the Polyspace Metrics repository. If you have justifications in your previous results, import them to the new results before uploading to the repository.
The Bug Finder Quality Objectives or BF-QOs are a set of thresholds against which you can compare your Bug Finder analysis results. These objectives are adapted from the Polyspace Code Prover™ Software Quality Objectives (Polyspace Code Prover). You can develop a review process based on the Quality Objectives.
You can use a predefined BF-QO level or define your own. Following are the predefined quality thresholds specified by each BF-QO.
Instead of using a predefined objective, you can define your own quality objectives and apply them to your project.
Save the following content in an XML file. Name the file
<?xml version="1.0" encoding="UTF-8"?> <MetricsDefinitions> <SQO ID="Custom-BF-QO-Level" ApplicableProduct="Bug Finder" ApplicableProject="My_Project"> <comf>20</comf> <path>80</path> <goto>0</goto> <vg>10</vg> <calling>5</calling> <calls>7</calls> <param>5</param> <stmt>50</stmt> <level>4</level> <return>1</return> <vocf>4</vocf> <ap_cg_cycle>0</ap_cg_cycle> <ap_cg_direct_cycle>0</ap_cg_direct_cycle> <Num_Unjustified_Violations>Custom_MISRA_Rules_Set</Num_Unjustified_Violations> <Num_Unjustified_BF_Checks>Custom_BF_Checks_Set</Num_Unjustified_BF_Checks> </SQO> <CodingRulesSet ID="Custom_MISRA_Rules_Set"> <Rule Name="MISRA_C_5_2">0</Rule> <Rule Name="MISRA_C_17_6">0</Rule> </CodingRulesSet> <BugFinderChecksSet ID="Custom_BF_Checks_Set"> <Check Name="UNREACHABLE">0</Check> <Check Name="USELESS_IF">0</Check> </BugFinderChecksSet> </MetricsDefinitions>
You can use this file for both Bug Finder and Code Prover results. For information on the XML elements specific to Code Prover, see Compare Metrics Against Software Quality Objectives (Polyspace Code Prover).
Save this XML file in the folder where remote analysis
data is stored, for example,
If you want to change the folder location, select Metrics > Metrics and Remote Server Settings.
To make the quality level
to a certain project, replace the value of the
with the project name.
If you want the quality objectives to apply to all
Modify the file to specify your thresholds.
For specifying coding rules, begin the rule name with the
appropriate string followed by the rule
_ instead of a decimal point in the rule
|MISRA C: 2004||MISRA C:2004 and MISRA AC AGC Coding Rules|
|MISRA C: 2012||MISRA C:2012 Directives and Rules|
|MISRA C++||MISRA C++:2008 Rules|
|JSF® C++||JSF C++ Coding Rules|
|Custom coding rules||Custom Coding Rules|
For specifying defects, use the defect acronym. See Short Names of Bug Finder Defect Checkers.
For specifying code metrics, use the code metric acronym. See Short Names of Code Complexity Metrics.
After you have made your modifications, in the Polyspace Metrics
interface, open the metrics for your project. From the Quality
Objectives list in the upper left, select
On the Summary tab, select an entry in the Level column. For the project name that you specified, your new quality objective Custom-BF-QO-Level appears in the drop-down list.
Select your new quality objective.
The software compares the thresholds you had specified against your results and updates the Overall Status column with PASS or FAIL.
To define another set of custom quality objectives,
add the following content to the
<SQO ID="Custom-BF-QO-Level_2" ParentID="Custom-BF-QO-Level" ApplicableProduct="Bug Finder" ApplicableProject="My_Project"> ... </SQO>
ID represents the name of the new
You cannot have the same values of
two different sets of quality objectives. For example, if you use
two different custom sets, and
both sets, you see the following error:
The SQO level 'Custom-BF-QO-Level' is multiply defined.
ParentID specifies another level
from which the current level inherits its quality objectives. In the
preceding example, the level
its quality objectives from the level
If you do not want to inherit quality objectives from another level, omit this attribute.
... represents the additional quality
thresholds that you specify for the level
The quality thresholds that you specify override the thresholds
Custom-BF-QO-Level_2 inherits from
For instance, if you specify
this objective overrides the threshold specification
The following tables list the XML elements that can be added to the custom BF-QO file. The content of each element specifies a threshold against which the software compares analysis results. For each element, the table lists the metric to which the threshold applies. Here, HIS refers to the Hersteller Initiative Software.
|Number of unjustified violations of coding rules specified
by entries under the element |
|Number of unjustified defects of types specified by entries
under the element |