In this section:

Viewing the Summary of Code Duplicate Analysis Findings

Import code duplicate analysis findings into the Findings to begin investigating duplicate code in your IDE (see Importing Findings). 

Right-click on a finding to open a contextual menu of options.

You can perform the following actions:

  • Choose Go To to view the code that triggered the violation in the editor (see "Viewing Code Duplicate Source Code below).
  • Choose Suppress... to suppress the violations triggered by the code duplicate detection rules (see “Suppressing Code Duplicate Analysis Findings” below).
  • Choose Show in Finding Details to open a hierarchical view of the lines of code associated with the finding (see “Viewing Code Duplicate Analysis Finding Details” below).
  • Choose Remove from View to remove the finding from the view.
  • Choose Show Documentation for [rule] to open the rule that triggered the violation.

Viewing Code Duplicate Analysis Finding Details

You can navigate through the instances of duplicate code associated with the finding from the Finding Details view.

The top node represents the first appearance of the duplicate code. Consecutive occurrences of the code are listed in order of appearance as children. You can perform the following actions:

  • Expand/collapse available children.
  • Double-click or right-click a node and choose Go To to view the source code in the editor.
  • Right-click a node and choose Suppress to choose suppression options (see “Suppressing Code Duplicate Analysis Findings” below).

Viewing Code Duplicate Source Code

When you open the source code from the Findings or Finding Details view, the specific line of code that triggered the finding is highlighted. 


Suppressing Code Duplicate Analysis Findings

There are several options for suppressing findings from duplicate code analysis.

  1. Right-click on a finding in the Findings view and choose Suppress... to open the suppression options.

  2. Enter a reason for the suppression and choose the type of suppression.
  3. Click OK to apply the suppression. 

You can also suppress a specific instance of duplicate code by right-clicking on a child node in the Finding Details view and choosing Suppress....

  • No labels