Relaxing and Excluding Artefacts

In this section, you will learn how to relax or exclude entire artefacts directly from the Artefact Tree instead of relaxing findings. 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. Excluding artefacts hides them from the project, and findings and action items are no longer created for them.

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.

Tip

The Mars is a sample project that includes ticket and test artefacts, in addition to the source code artefacts you have encountered up to this point. For more information about projects containing artefact types other than source code, refer to Chapter 7, Going Beyond Source Code.

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. V3.2.7 is a version that analysed as a draft so that you can edit form values, relax, exclude ot add artefacts in preparation for the next analysis, as described in the section called “Working with Draft and Baseline Versions”.

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

The artefacts in the V3.2.7 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 in this project and create a new draft build of the project, then you will end up seeing changes in the overall rating,

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. , you can do so by clicking the option from the Explorer Settings menu. If you want to show them, you can create a filter that includes relaxed artefacts by checking the boxes with the appropriate status in the Filter Panel:

The artefact statuses shown by default in the Artefact Tree

Excluded artefacts can be shown or hidden by clicking the View Excluded Artefacts menu option in the Artefact Tree

The View Excluded Artefacts menu option in the Artefact Tree