This section explains general code review configuration options (options that apply to both pre-commit and post-commit processes).

Sections include:

Configuring Code Review Preferences

To configure Code Review preferences on every team Para installation:

  1. Choose Parasoft> Preferences to open the Preferences dialog.
  2. If you have not already done so, configure source control preferences as follows:
    1. Select the Parasoft> Scope and Authorship category in the left pane of the Preferences panel.
    2. Enable Use source control (modification author) to compute scope.
    3. Select the Parasoft> Source Control category in the left pane of the Preferences panel.
    4. Specify your team’s source control repository. See Connecting to Source Control for details.
  3. If you have not already done so, configure Team Server preferences under  Parasoft> DTP> Team Server.

    If your Parasoft solution uses Team Server Named Accounts, ensure that Team Server user accounts can access the Team Server 'Code Review' directory. For details on opening the appropriate path permissions, see the 'Named Accounts' section of the PST Admin Guide.'

  4. To store code review data in Report Center (recommended for more efficient storage), specify the settings under  Parasoft> DTP> Project Center (see Connecting to Project Center for details).
  5. (Desktop installations only) Select the Parasoft> Code Review category in the left pane, then complete the Code Review settings as follows:
  6. (Desktop installations only) Select the Parasoft> Code Review> Team category in the left pane, then complete the Code Review settings as follows:


Team Server storage is deprecated. To migrate data from Team Server to the current storage method (Report Center):

    1. Open the TCM Data Storage page in a web browser and go to the root folder for the tcm user account that was being used for code review.
    2. In the 'codereview' subfolder, set or change the value of the 'storage.type' property to 'db.storage.type'.
    3. Restart the IDE.
    4. In the preferences page described here (Preferences> Parasoft> Code Review> Team) click the Import button to transfer data from Team Server to Report Center.

   7. Click Apply to apply your settings.
   8. Click OK to set and save your settings.

Configuring Test Configurations for Scanning

Test Configurations control how code reviews are prepared, and the appropriate configuration varies depending on whether your team has a pre-commit or post-commit code review process. 

Hiding Differences for Specific Pieces of Code

If you do not want the compare editor to show diffs that occur within specific blocks of code:

  1. Add the codereview-begin-suppress comment at the point in the code where you want to stop showing differences.
  2. Add the codereview-end-suppress comment at the point in the code where you want to resume reporting of differences.

By default, suppressed code will not be shown in diffs for related code review tasks (for example, a diff highlighting a code change immediately following or preceding suppressed code). If you later want to view the suppressed content in diffs: 

  1. Choose Parasoft> Preferences to open the Preferences dialog.
  2. Select the Parasoft> Code Review category in the left pane.
  3. Enable the Show suppressed parts option.

If you want the code review scan to ignore all differences that occur between "codereview-begin-suppress" and "codereview-end-suppress" markers, enable Ignore changes within suppressed blocks in the Code Review> Filters tab.

Troubleshooting Unpublished or Skipped Reviews

Unpublished Reviews

If the Test Progress tab reports that reviews were not published, this is a sign that your configuration has undefined authors.

For example, assume that your code review results are as follows:



In this case, 2 files have been scanned and 2 revisions have been accepted—but there is no code review package to publish, because the scanned code had modifications made by "pietrek"—and the Test Configuration does not list pietrek in the Code Review> Authors tab.

To correct this problem:

  1. Add the author to the Test Configuration’s Code Review> Authors tab.
  2. Either assign a reviewer to review all code by this author, or assign a reviewer to the area of source code where this author’s revisions occur.
  3. Run the Test Configuration again.

Skipped Reviews

If the results show that reviews were skipped (with undefined users and/or unmatched paths by author), this is a sign that the modified code is not properly assigned to a reviewer. 

For example, assume that you have the following results



and that your report indicates the following:



You can resolve the problem by modifying the Test Configuration to either assign that area of code to a reviewer, or to assign a reviewer to all code modified by that author.

Understanding How Code Review Packages are Created

Each code review package is defined based on the author changes (commits).

Any reviewers and monitors mapped to that author are then assigned to the package. If the package contains code from the project areas that other reviewers or monitors are set to review, those reviewers/monitors are also assigned to this package.

If a package is created and no reviewers or monitors are set to review the related author or project area, then no review tasks will be generated for that package.

Separate packages are not created for different paths (regions). As a result, reviewers assigned to different paths may be working on the same package. They should decide for themselves which paths they want to review. This maintains the integrity of tasks that may spread across multiple reviewers' assigned areas. If a reviewer wants to see which files in a package were matched to him because they belong to "his" assigned region, this information is available in the Code Review view. 

Importing Code Review Data from Team Server to the DTP Report Center Database

It is more efficient to store network data in the DTP Report Center database instead of in flat files on Team Server. Team Server storage is supported for backward compatibility, but Report Center storage is strongly recommended.

To migrate code review data from Team Server to Report Center:

  1. Choose Parasoft> Preferences.
  2. Open Parasoft> Code Review> Team.
  3. Click Import, then complete the dialog that opens. This allows you to import all code review data or only packages from specified data range. If existing items are imported, they will be duplicated.

The average time needed to import one Code Review package from Team Server to the DTP database is approximately 30 seconds. A safe estimate is to assume that you can import about 2880 packages per day.