Viewing a diff of your file in Visual Studio
When submitting a code review, you can look at a diff of the file(s) to see what changes have been made since your last commit. To see the diff, you must first configure the Klocwork plug-in to use your preferred diff tool.
- The Klocwork Server must be running
- As of 2019.2, Code Review must be enabled in Visual Studio manually
- Your SCM must be integrated and you must have a cloned SCM repository on local storage
- An external diff tool must be installed on your local machine
- First, you'll need to enable Code Review in Visual Studio to access the Diff Viewer. Go to Klocwork > Options and click on the Code Review tab. Under Code Review State, select the Enable Code Review check box.
- Next, go to Klocwork > Options > Klocwork > General.
- Click the Code Review tab.
- In the Command field, browse to the path of your diff tool. For example, C:\Program Files (x86)\WinMerge\WinMergeU.exe.
- OPTIONAL: If your diff tool requires additional macros for the original file and modified file, add them to the Arguments field. If no arguments are provided, it uses "$(BasePath)" "$(ItemPath)" as the defaults.
Viewing the diff from Visual Studio