Relaxing Artefacts

In this section, you will learn how to relax artefacts directly from the Artefact Tree instead of relaxing violations by editing the source code of the application. Relaxing artefacts ensures that their metrics do not impact the rating of the project, however, data providers will still generate findings for the relaxed artefacts.

This example uses the Mars project from the samples folder. Ensure that you are a Project Manager in this project, or are part of a role with the View Drafts of Projects and Modify Artefacts privileges before you begin.

Expand the Project Portfolios to show all the versions of Mars. There are two versions in the tree (from bottom to top):

  1. V3.2.6 is the baseline version, whose results were computed during the analysis and cannot be changed.
  2. Current is a version that was automatically inserted so that you can edit form values, relax, exclude ot add artefacts in preparation for the next analysis.

Tip

For more information about the concepts behind baseline and draft versions, refer to the section called “Working with Draft and Baseline Versions”.

Click on Mars > Current to see the artefacts in the Mars project as created by the demo script:

The artefacts in the Current version of the Mars project and their rating

To relax an artefact and therefore tell Squore that its rating should not impact the rest of the project, display the context menu for this artefact. The relaxation options appear at the bottom of the menu if they are available for your model, as shown below:

The artefact context menu

There are two actions that can be taken to relax an artefact:

Tip

In both cases, the relaxation action is only made on a draft version and can be reversed by selecting the Un-relax... entry in the menu or the Clear unapplied changes option in the project portfolio.

Clicking Relax... or Exclude... brings up a pop-up menu where you can type a comment to explain the reason for the relaxation. Let's relax mars_common.c so it stops impacting the overall project rating. Click the Relax... option in the menu to display the relaxation popup and enter a relaxation comment:

The relaxation justification

Click Confirm to save your comment, and notice how the Artefact Tree is updated to reflect the finding's status:

The relaxed mars_common.c in the Artefact Tree

Other users can review the justification for the relaxation by clicking on the Log... item in the artefact context menu:

The log of changes for the artefact mars_common.c

If you keep relaxing artefacts rated C in this project and create a new draft build of the project, then you will end up seeing changes in the overall rating, as shown below:

The improved rating of the Mars project after a new analysis

Tip

When you relax an artefact, the action items and findings relevant to this artefact are hidden, except when you specifically click on the relaxed artefact. If you want to show them, you can do so by clicking the Include Relaxed Artefacts option from the Explorer Settings menu.

You can show or hide relaxed and excluded artefacts by checking the boxes with the appropriate status in the filter popup:

The artefact statuses shown by default in the Artefact Tree