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

Tips and tricks for Klocwork Desktop Plug-in for Visual Studio

Tips and tricks for Klocwork Desktop Plug-in for Visual Studio

Here are some tips and tricks to help you customize several different settings when you use a Klocwork Desktop plug-in for Visual Studio.

Control which issues you see

With our plug-ins for Visual Studio, you can customize how issues are displayed within your issue list.

Visual Studio Extension:

  • group by taxonomy, file, severity, or checker code
  • filter to show only local issues
  • filter to show issues only in the active file
  • drop-down list to show issues with specified status ('analyze' and 'fix' are selected by default)
  • drop-down list to show issues with specified severity (all are selected by default)

Visual Studio addin:

  • group by taxonomy, file, severity, or checker code
  • filter to show only local issues
  • filter to show issues only in the active file
  • filter to show ignored issues (when this filter is disabled, only 'analyze' or 'fix' issues are shown)
Note: If you group by Taxonomy and the same issue was detected in multiple taxonomies, that issue is reported in each applicable taxonomy. This is the only situation in which the same issue is reported multiple times.

Locate server or system issues - Visual Studio Extension

For connected desktops, you may need to investigate or fix a server or system issue. In the Visual Studio Extension, Klocwork identifies server issues with the icon in the issue list. These are issues that have been identified in an integration build on the Klocwork Server.

To locate a server or system issue:

  1. Obtain as much information about the issue as you can, such as the file in which the issue is located, issue type (for example, ABV.GENERAL), line number, and severity.
  2. Make sure the Show Local issues only setting is toggled off.
  3. In the Klocwork Issues window, click Group by file and Group by issue code.
  4. Locate the file of interest in the list and expand it.
  5. Locate the issue type (for example, ABV.GENERAL) and select the one with the appropriate line number.

Locate system issues - Visual Studio addin

For connected desktops, you may need to investigate or fix system issue. Klocwork provides a System ID for each detected issue. By default, the connected desktop does not identify issues by ID number in the issue list.

To locate a system issue in the Visual Studio addin:

  1. Obtain as much information about the issue as you can, such as the file in which the issue is located, issue type (for example, ABV.GENERAL), line number, and severity.
  2. Make sure the Show Local issues only setting is toggled off.
  3. In the Klocwork Issues window, click Group by file and Group by issue code.
  4. Locate the file of interest in the list and expand it.
  5. Locate the issue type (for example, ABV.GENERAL) and select the one with the appropriate line number.

Recover an issue you ignored

To recover an issue that you previously ignored:

Visual Studio Extension:
  1. In the Klocwork Issues window, click and select the status of the issue you want to recover.
  2. Right-click the issue and select Recover issue.

Visual Studio addin:

  1. In the Klocwork Issues window, click to show ignored issues.
  2. Right-click and issue and select Recover issue.

Enable and disable checkers

You enable and disable checkers in the Configuration Editor, accessed through the Klocwork Properties dialog.

If your solution contains both C/C++ and C# projects, you configure C/C++ issues in the C++ Projects tab, and C# issues in the C# Projects tab. Each Configuration Editor shows only checkers and taxonomies applicable to the language. Taxonomies containing both C/C++ and C# checkers appear in each Configuration Editor, but show only those issue types applicable to the language.

To enable or disable checkers:

  1. Right-click a solution and select Klocwork Solution Properties.
  2. Click the C/C++ projects or C# projects tab.
  3. Select and deselect checkers as required. To learn more about the checkers, see C and C++ checker reference and C# checker reference.
    Tip: You can also disable a checker by right-clicking a defect in the Klocwork Issues window, and selecting Manage <checker name> Checker > Disable <checker name> Checker.
  4. Use the Search field to locate checkers by code, title, reference, category or taxonomy.

    Your changes take effect when the next analysis is triggered.

    CAUTION:
    Clicking Restore Defaults restores all factory default settings. If your project is synced with the server, it will restore to the server's checker configuration settings.

Change License Server settings

Host and port information for the License Server is typically set during installation. However, if this information changes, you need to update the information in the Settings dialog (Klocwork > Options > Klocwork > General).

Disconnect from the Klocwork Server

To disconnect your project or workspace from the server project:

  1. Right-click your solution and select Klocwork Solution Properties.
  2. In the Klocwork project field, select the blank entry from the drop-down menu and click OK.

Customize or disable on-the-fly analysis

By default, on-the-fly analysis is enabled for C/C++ projects. On-the-fly analysis is not supported for C# projects. Analysis runs every time you open or pause while editing a file. If you prefer to have it run every time a file is saved, do the following:

  1. Go to Klocwork > Options > Klocwork > General and select the Analysis tab.
  2. From the On-The-Fly analysis dialog, select On File Save.

Now on-the-fly analysis runs when you save a file.

Also, you can set if analysis is continued when a document is closed. From the Analysis tab, enable or disable the option Continue analysis after the file has closed.

To disable on-the-fly analysis:

  1. Go to Klocwork > Options > Klocwork > General and select the Analysis tab.
  2. From the On-The-Fly analysis menu, select Disabled.

Now, to run an analysis, you must right-click a solution and select Analyze Solution or right-click a project and select Analyze Selection.

Disable or enable on-the-fly analysis issue markers in editor

To disable the left-margin icons, click Klocwork > Options > Klocwork > General, click the Appearance tab and clear the Show marker on left margin for issues check box. You can also disable "underlining" as an additional marker.

View more information about a detected issue

To view more information about a detected issue, select the issue in the Klocwork Issues window and select Klocwork > Windows > Klocwork Issues.

The Klocwork Issues Information window provides detailed information about each issue, for example, the ID, File, Line, Column, Description, Severity, and Owner. If the issue was detected in an integration build, the ID field displays a number.

For the Visual Studio Extension, the ID field displays "Desktop" if the issue was detected only in your desktop project. Server issues are indicated by the icon in the issue list.

For the Visual Studio addin, the ID field displays "local" if the issue was detected only in your desktop project.