Adding Comments to Code

There are two comment types available: a general note on a review, and a code-specific comment. A general comment is used, for example, when a reviewer wants to indicate a recurring mistake/defect in the author’s code. Leaving a code-specific comment is handy when a reviewer comes across a single, not typical defect.

To add a general comment to the whole review:

  1. Select a review.

  2. Click Add General Comment.

  3. Enter the comment text into the corresponding field.

  4. Click Create.

Add general comment

Note:

All reviews and comments have their ID - a unique identifier that can be used when searching specific comment or review.

To add a comment to a specific line of the code:

  1. Select a file from the list, double-click it to review. The file is opened in a new window.

    File list

  2. Right-click a code line, and click Add Review Comment in the shortcut menu.

    Adding comment to a line

  3. Enter the comment description.

    Comment field

  4. Click Create.

    Online comment

To add a comment to a block of code:

  1. Select a file from the list, double-click it to review. The file is opened in a new window.

  2. Right-click a code block, and click Add Review Comment in the shortcut menu.

    Add multiple comments

  3. Enter the comment description.

    Add comments

  4. Click Create.

Add multiple comments

To open the comment description, click the comment marker.

Add multiple comments

Adding a comment to a review with multiple authors:

There are two situations when multiple authors may be assigned to a review:

  • When multiple revisions with different authors are added to the review, the authors are added automatically;
  • When authors are added manually.

All authors have equal rights and may restart or close a review independently of each other.

Adding a comment to a multiple author review is similar to that described in the above topics. Comments are then automatically addressed to the author of a file revision commented upon.

When you add a comment in a multiple authors review, the Assignee box automatically fills up with the author of the file revision. To change the assignee, select one of the available authors from the drop-down list.

Multiple author comment