Running code review reports

When working with code reviews, you can run reports to view historical information about a code review and files in it. Use these reports to see unaddressed comments, replies to comments, review your code review process, or save process information for audits.

You can run the following types of code review reports:

  • Summary reports include a list of code reviews and the files in them.
  • Detail reports include more detailed information about each code review, the files in it, and comments and replies added to the files.
Code review coverage reports are also available. Use these reports to see file versions in code reviews and if the individual file reviews are complete or still in progress. This report can you help you determine if you are ready to release your product, measure coverage of your code review process, or demonstrate quality control during an audit. See Creating code review coverage reports.

1. Choose View > Code Reviews.

The Code Reviews window opens.

2. Select the Mainline branch that includes the files and code reviews.

3. Select a Report on Code Reviews option.

  • All code reviews includes all reviews in the report.
  • Selected code reviews only includes specific reviews. Select the code reviews to include. To limit the reviews displayed, select a Filter. To search for a review, select <Advanced find>. See Searching for code reviews.
All files in a selected code review are included in detail style reports. To only include specific files, select the files to include in the review.

4. Click Report On.

The Code Review Report dialog box opens.

5. Select an Output format. Reports can be formatted in HTML or plain text format.

6. If the selected output format is HTML, select a Stylesheet to format the report.

Cascading Style Sheets (CSS) files are installed with Surround SCM to create reports with a predefined layout and design. You can customize these stylesheets or create your own. Code review report stylesheets are stored in the StyleSheets/CodeReview directory in the Surround SCM application directory on the server.

7. Select a report type. See Examples.

  • Summary style report includes general information about the review, including the name, status, due date, authors, reviewers, and notes.
  • Detail style report includes detailed information about the review and files in it. Select any of the following options for these reports.
  • Include unaddressed comments includes all unaddressed comments and replies for a file.
  • Include addressed comments includes all addressed comments and replies for a file.
  • Include commented file contents with # lines of context includes the specified number of context lines from the file before and after a comment. Including context lines can help you understand more about the code a comment applies to. Context lines are only included for comments in text files and not binary files.

8. Select a Sort comments by option to indicate the order to display review comments in the report.

  • Location in file organizes comments in the same order they are in the file.
  • Timestamp organizes comments based on date and time, from oldest to newest.

9. Click Run.

The report opens.

10. Click Save As to save the report or Print to print it.

These options are only available in the internal report viewer. If an HTML report opens in a browser, you can save, export, or print the report from the browser.

11. Click Close when you finish.