Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

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.

Prerequisites:
  • The Klocwork Server must be running
  • 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
To configure your diff tool with Visual Studio:
  1. Go to Klocwork > Options > Klocwork > General.
  2. Click the Diff Viewer tab.
  3. In the Command field, browse to the path of your diff tool. For example, C:\Program Files (x86)\WinMerge\WinMergeU.exe.
  4. 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.
Note: The file path may contain spaces, so it's good practice to include quotes around the macros when defining the arguments.

Viewing the diff from Visual Studio

To view the diff for your code review, right-click the file and open the Create Code Review dialog. In the Changes field, click on a node and select Diff.
Tip: You can also right-click and select Diff file or double-click on a node to view the diff.
The diff tool you configured with Visual Studio will open showing you the original file and the modified file.
Note: If the node you are trying to view has any associated children nodes, all of them will be diffed.