Running CodeReview from the Command line using a batch file.



How to run CodeReview from the Command line?


DevPartner version 7.X includes a command-line utility, called CR7Batch. You can run CR7Batch to review large solutions with many Visual C# .NET and/or Visual Basic .NET projects or as an overnight or automated build process. CR7Batch streamlines the process by bypassing the display mechanism in DevPartner.

You can optimize the CR7Batch functionality. When you select Always generate a batch file on the Options page, DevPartner generates a batch file during the next interactive code review performed in the IDE. You can use this batch file to run CR7Batch on the same solution.

Note: If the solution file to be reviewed is set to read-only, the batch review will be interrupted by an IDE error message.

When you run a CR7Batch review on a solution, all the Visual C# .NET and/or Visual Basic .NET projects in that solution are automatically reviewed.

Running a Solution Review Using CR7Batch:

Open the Windows command prompt.

On the command line, change to the directory where the solution exists.

Enter the command: CR7Batch /f full path of configuration file name

If you previously ran a review on this solution in the interactive mode, a configuration file would have been created in the solution's directory, i.e., CR_your_solution_name.CRB, as well as a batch file, i.e., CR_your_solution_name.BAT. These files allow you to run a command line review on this solution.

From the same path, execute the CR_your_solution_name.BAT batch file.

This action loads Visual Studio .NET with the solution that was referenced in the .CRB file. The code will be reviewed using the same criteria as the interactive review that produced these files originally.



CR7Batch reports are available after a review completes. The session file is identical in content to one created interactively. With guidance from your network administrator, you can script a batch procedure and e-mail the generated summary and session files to another location. Also, the HTML-formatted summary file can be saved to and subsequently viewed from a local intranet or from an external Internet Web site.

If DevPartner is unable to execute a batch review, an error file, CR_solution-name.err, will be generated.

Please refer to our .Net integrated help for more information. Choose 'DevPartner CodeReview' as your filter and search for the word 'Batch'.


Old KB# 11843
Comment List
Related Discussions