Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space ENGINES1031 and version 10.3.4

In this section:

Table of Contents

Viewing the Summary of Code Duplicate Analysis Findings

Import code duplicate analysis findings into the DTP Findings to begin investigating duplicate code in your IDE (see 指摘事項のインポート). 

Conditional Content
product: (cpptest, jtest)
product: (cpptest, jtest)
sv-attr:0A01020401598D973E6641760F8AF4E50A01020401598D973E6749C5267CE6FE 0A01020401598D973E671AAA268425A3

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 DTP 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 DTP Finding Details view.

Conditional Content
product: (cpptest, jtest)
product: (cpptest, jtest)
sv-attr:0A01020401598D973E6641760F8AF4E50A01020401598D973E6749C5267CE6FE 0A01020401598D973E671AAA268425A3

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 DTP Findings or DTP Finding Details view, the specific line of code that triggered the finding is highlighted. 

Conditional Content
product: (cpptest, jtest)
product: (cpptest, jtest)
sv-attr:0A01020401598D973E6641760F8AF4E50A01020401598D973E6749C5267CE6FE 0A01020401598D973E671AAA268425A3


Suppressing Code Duplicate Analysis Findings

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

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

    Conditional Content
    product: (cpptest, jtest)
    product: (cpptest, jtest)
    sv-attr:0A01020401598D973E6641760F8AF4E50A01020401598D973E6749C5267CE6FE 0A01020401598D973E671AAA268425A3

  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 DTP Finding Details view and choosing Suppress....

Conditional Content
product: (cpptest, jtest)
product: (cpptest, jtest)
sv-attr:0A01020401598D973E6641760F8AF4E50A01020401598D973E6749C5267CE6FE 0A01020401598D973E671AAA268425A3