Fixing defects

This page describes how a developer handles an assigned defect, from opening the task to checking the correction at the next analysis.

For the meaning of each field mentioned here, see Defect Details and Task Details.

These procedures use Visual Expert Web. For what differs in Visual Expert Desktop, see Defect & Task Management in Visual Expert Desktop.

On this page

How a defect and its task move

ActionDefectTask
The reporter assigns the defectOpenOpen
The assignee starts workOpenIn Progress
The assignee marks the defect as fixedPending ValidationIn Progress
The next analysis no longer detects the defectResolvedIn Progress
The assignee completes the taskResolvedCompleted

The value in bold is the one that changes. Every change is made by a user, except Resolved, which Visual Expert sets at the next analysis.

Open a task assigned to you

  • Click the Tasks tab. The Task Dashboard opens.
  • Click the Assigned to Me counter. The task list opens, limited to the tasks assigned to you.

Fixing defects

  • Click a task. It opens in a side panel, with its description, its status and the items it is linked to.

Fixing defects

Start work on a task

A task reaches you with the status Open. To assign a defect, see Triaging defects.

  • In the task, click Status, then select In Progress. The change is applied immediately.

Priority and Due Date are changed the same way.

You can also change the status from the task list. Select the task with its checkbox, then click Status in the action bar.

The defect holds the finding: its occurrences, its source code and its rule.

  • In the task, scroll to Related Items.
  • Click the defect entry. The defect opens.

Fixing defects

On the defect, click View Task to go back.

Examine the defect

A defect may contain several occurrences of the same rule violation. A status applies to the whole defect, not to a single occurrence. Review all of them before you change the status of the defect.

  • Look at the Occurrences table (A). It lists each place where the rule is broken, with the line number and the start of the statement.

Fixing defects

  • Click an occurrence. The source code viewer moves to that line and highlights it. To move between occurrences, you can also use the line numbers under the code (B).
  • Read the Details tab for the reason the defect was detected, its potential impact and the recommended corrective actions.

Fixing defects

  • Read the Benefits tab to see what following the rule brings to the code.

Fixing defects

To open the rule documentation, click the Code Rule entry in Related Items on the task.

Measure the impact of a correction before making it

A correction can affect code outside the container where the defect was found.

  • At the top of the defect, click Find All References.

Fixing defects

The Code Explorer tab opens on an Impact Analysis tree. It lists the objects that reference the affected one.

  • Click an object in the tree. Its source code appears on the right.

Fixing defects

If the correction turns out to be disproportionate, the defect can be recorded as an accepted risk instead. See Triaging defects.

Get a suggested correction

  • At the top of the defect, click Potential Solution (AI).

Fixing defects

  • Read the proposed correction and apply it yourself. Visual Expert does not change your code.

Fixing defects

Mark the defect as fixed

Mark As Fixed is a button at the top of the defect, next to Accepted Risks and False Positive.

  • Once the code is changed, open the defect.
  • Click Mark As Fixed. The defect moves to Pending Validation.

Fixing defects

Visual Expert checks the defect again at the next analysis.

Check the correction at the next analysis

  • After the next analysis, click the Code Inspection tab.
  • Check the analysis date at the top right.
  • Click the Resolved counter. The list shows the defects that the analysis no longer detects.

If your defect is listed, the correction is confirmed and the defect is Resolved.

If it is not listed, it is still being detected. Open it and check whether the correction covers every occurrence.

Close the task

You can complete the task as soon as you have made the change. You can also wait until the next analysis confirms the correction.

  • Open the task.
  • Click Status, then select Completed. The change is applied immediately.
  • If it helps later readers, add a closing comment in Comments.

You can also do this from the task list. Select the task with its checkbox. Click Status in the action bar, then select Completed.