Using the standalone Configuration Editor

You can use the standalone Configuration editor (kwconfigeditor) to enable and disable checkers, and to configure severities for your Klocwork Server. You can also use kwdtconfeditor on the desktop to enable and disable checkers. You can access both tools from the command line by running one of the following commands:

To create a new configuration file on the Server, run the command:

kwconfigeditor

To create a new configuration file on your desktop, run the command:

kwdtconfeditor

The appropriate Configuration Editor opens in a new window and you can make any changes required.

For projects with an existing configuration file on the Server, run the command:

kwconfigeditor <path/to/mypconf.pconf>

For projects with an existing configuration file on the desktop, run the command:

kwdtconfeditor <path/to/mypconf.pconf>

In this scenario, make sure you are pointing to the configuration file for the project you want to change.

If you are editing the default Analysis Profile, it's a good idea to back up the <server>\projects_root\projects\<project>\rules\analysis_profile.pconf file first.

Example

kwconfigeditor "C:\Klocwork\Server 21.1\projects_root\projects\csvtosql\rules\analysis_profile.pconf"

Changing issue severities

You can change issue severities using kwconfigeditor. The severity label (for example, "Critical") is associated with a severity number. You can change the severity label to whatever is most meaningful.

Ten severity levels are available. Klocwork checkers use only severities 1 through 4 by default, but you can edit the severity level for any checker.

To change a severity label:

  1. Open the standalone Configuration editor.
  2. Click the Severities tab.
  3. Click the text you want to change in the Name column.
  4. Type the new severity label. You can use alphanumeric characters, as well as space, minus, and underscore.
  5. Click OK and save your .pconffile somewhere you can find it.

To change the severity level of a checker:

  1. Open the standalone Configuration editor.
  2. On the Analysis Profile tab, expand an issue category to display the checker you want to change.
  3. Right-click the checker.
  4. In the pop-up menu, select Change Severity, and select a new severity level (for example, 2: Error).
  5. Click OK and save your .pconf file somewhere you can find it.

When you make a change to a severity in one taxonomy, the change is applied to all taxonomies that contain a checker with that severity associated to it.

Importing a configuration file

You can import the new .pconf file for your project using the kwadmin import-config command or by importing it through the Configuration tab for your specific project in Static Code Analysis, as follows:

Important: Importing a new configuration file overwrites any previous checker configuration for the project.

  1. Launch the Klocwork Portal and log in to Klocwork Static Code Analysis.
  2. In Klocwork Static Code Analysis's project list, click the project you want to upload the file to; The project details appear.
  3. Click Configuration.
  4. On the Configuration page, click Add a configuration file.
  5. In the Choose file dialog, browse to the location of your new .pconf file.
  6. Click Upload; your new Analysis Profile is now applied to that project.