Integrating with Klocwork

Klocwork analyzes your code and detects defects and vulnerabilities. Incredibuild can integrate with Klocwork to accelerate these processes. You just need to install an Incredibuild agent on your Klocwork machines, and modify the commands you use to run Klocwork. You can read all the details below, but you can also check out Klocwork's documentation.


  1. Klocwork must be installed with a valid license.

  2. You also need the 'access Web API' permission in Klocwork. By default, this permission is assigned to project root admins and project admins. For more information about roles, see Setting up roles in the Klocwork documentation.

  3. An Incredibuild initiator agent must be installed on any Klocwork machines that will be used to run static code analysis. The initiator agent's license must have the Klocwork AddOn.

  4. If you are using Incredibuild Cloud helpers, they must be able to communicate with your Klocwork license server.

Analyzing a C++ Project Using Klocwork and Incredibuild

Step 1: Create a Build Specification using kwinject

This step can be distributed and accelerated using Incredibuild's buildconsole command.

For example:

kwinject buildconsole.exe <”sln path”> /rebuild /cfg="Debug|Win64"

Step 2: Run an Integration Build Analysis

This can be distributed and accelerated using Incredibuild's xgConsole command (the syntax is the same as the ibconsole command).

For example:

xgConsole /profile="C:\Klocwork\Server 21.1\config\xgProfile.xml" /title=<"title name"> /command="kwbuildproject --url http://localhost:8080/<project_name> -j [n] -o kwtables -f kwinject.out”