Peer Code Review with Team Foundation Server 11 – Part 4
Action: Reviewer Makes a Comment
The reviewer doesn’t need to accept the code review to look at the code, but once they have accepted, the requestor is most assuredly assuming they will.
The reviewer can click the name of a file and the diff tool will open to show the original file on the left and the proposed changes on the right.
There is a checkbox next to each file that allows the reviewer to track which files he/she has been through.
There are three primary ways to communicate through the code review tool.
- Comment at line-level – The reviewer can highlight any code in the diff tool, right-click, and select Add Comment. This will provide the requestor with the comment and its associated line number.
- Comment at code review-level – The reviewer can click Add Overall Comment at any time and enter more general comments on the code review.
- Respond to requestor comments – The reviewer can respond to requestor comments by clicking Reply and create a conversation chain. These replies are added to the overall comments.
Note that comment boxes support multiple lines and carriage returns. This means you have to hit Ctrl+Enter or click Save to save the comment. You can edit or delete comments as well.
All comments will remain unsent until the reviewer is ready and either clicks Send Comments or Send & Finish. Additional comments can still be added at any level after sending comments or finishing the code review.
Finishing a code review changes the State and Reason of the reviewer’s Code Review Response work item to Closed.
The Code Review Request work item is updated to reflect the reviewer’s comments. You can see this in the History field of the work item form, but you cannot inspect the actual comments. To see the comments, you must click the hyperlink at the top of the work item form labeled Open Code Review in Team Explorer.