Main Content

Manage Software Quality Objectives in Polyspace Access

To monitor the quality of your code against predefined (Polyspace Bug Finder) software quality thresholds or user-defined thresholds, use the Quality Objectives dashboard. See Monitor Code Quality Using Quality Objectives Dashboard in Polyspace Access.

The first time that you upload results to a new project, Polyspace® Access™ assigns the default Polyspace Software Quality Objectives definition to that project. To create custom software quality objective (SQO) definitions, see Customize Software Quality Objectives.

You can manage the SQO of a project from the user interface or at the command line.

After you assign an SQO definition, you see the label SQO not computed (not computed) on the Quality Objectives card and dashboard until the project statistics are recalculated.

The SQO statistics for a project are recalculated when:

  • You upload a new run for the project.

  • You select a finding and make a change to any of the fields in the Result Details pane.

The SQO definition that you assign to a project applies only to runs that you upload to the project after assigning the definition.

Tip

When the Quality Objectives settings and the calculated statistics for a project are out of sync, the Quality Objectives dashboard displays a warning.

If you delete an SQO definition, Polyspace Access assigns the Polyspace Software Quality Objectives to all the projects to which the deleted definition was assigned.

Manage SQOs in the User Interface

To assign an SQO definition or level to a project, right-click a project in the Project Explorer or click Polyspace Access gear icon on the Quality Objectives card or the Quality Objectives dashboard.

Quality Objectives dashboard

If you make changes to a quality objectives definition that applies to multiple projects, Polyspace Access displays a warning with a link to the Project Assignment tab on the Quality Objectives Settings window. Open the tab to determine which projects are affected by your changes and inform users that are contributors to those projects of the changes to the quality objectives definition.

To view which projects an SQO definition is assigned to, go to the Project Assignment tab in the Quality Objectives Settings.

Quality Objectives settings view

Manage SQOs at the Command Line

To manage SQOs from the command line, use the polyspace-access command. In the following examples, $LOGIN is a variable that stores the login credentials and other connection information. To configure this variable, see Encrypt Password and Store Login Options in a Variable.

You can:

  • Assign an SQO level, and optionally an SQO definition to a project. For instance, to assign level 3 of SQO definition My Custom SQO to project myProject with project path public/examples/myProject, enter this command:

    polyspace-access -set-sqo public/examples/myProject -level 3 -name "My Custom SQO" $LOGIN

    Option -level is mandatory and can be any value from 1 to 6 or "exhaustive", while option -name is optional.

    If you do not use -name, the level that you specify is applied for the currently assigned SQO definition.

  • View the currently assigned SQO definition and SQO level for a project. For instance, to view the assigned SQO level and definition for project myProject with project path public/examples/myProject, enter this command:

    polyspace-access -get-sqo public/examples/myProject $LOGIN
    The command outputs the SQO name and level in this format:
    Current Quality Objectives: NAME My Custom SQO LEVEL SQO-3
    

  • View a list of all currently available SQO definitions. Enter this command:

    polyspace-access -list-sqo $LOGIN

Related Topics