This topic explains how authors use Code Review to examine and respond to comments that a reviewer has added.
Sections include:
For details on how a developer prepares code for review in a "pre-commit" code review workflow, see Configuring and Running Pre-Commit Code Review Scans.
Typical Workflow
Authors use Code Review to review and respond to reviewer comments as follows:
- Import or refresh tasks in the Quality Tasks view.
- Double-click the node for the item you want to explore.
- Choose Parasoft> Show View> Code Review Issue to open the Code Review Issue view.
- Read the available reviewer comments.
Modify the source code as needed in your editor.
Post-Commit Tip
If you are working in a post-commit process, a new "To review" code review task will be generated as soon as you commit the modified code. In that case, additional issues and comments will be associated with that new code review task, and the current issue can be closed.
- Add your comments on the issue (your response to the reviewer).
- To add a new comment on a specific line of code, right-click that line of code in the Compare panel, choose Add Code Review Issue, then add your comment. Code Review automatically adds the file path to your comments.
- To add a new general comment, right-click the appropriate code review tree item, choose Add General Thread, then add your comment.
- To add an additional comment for the selected issue, enter it in the Add New Comment to Current Issue text field.
- Click the appropriate status button in the toolbar:
- To Review – Choose this action to have your comments and revision reviewed. Once committed, the issue will be reassigned to the designated reviewer.
- Done – Choose this action if no additional action is required (for example, you have implemented a reviewer’s suggestion, and the reviewer does not want to review the modification). The issue will be considered "closed" after this action is committed. If your Code Review is setup for a restricted workflow, this option will not be available.
- To Review – Choose this action to have your comments and revision reviewed. Once committed, the issue will be reassigned to the designated reviewer.
- Click the Commit Review button in the top of the Code Review Issue view.
- When you done working on a revision that your reviewer has accepted, right-click the revision and choose Mark as Done. The revision will then be removed from your code review tree This option is available only in certain workflow configurations. See below for details.
Workflow Diagrams
The following diagrams illustrate the various workflows available.
For more details, see Workflow Overview.
Cancelling a Review
If you want to cancel a complete review or any part of a review (e.g., if you mistakenly committed a package for review or want to make additional changes prior to the review), right-click the appropriate item(s) in the code review tree, then choose Cancel from the shortcut menu.
Adding a Reviewer
If you want to add another reviewer (e.g., for a second opinion), right-click the appropriate item(s) in the code review tree, then choose Add Reviewer from the shortcut menu.