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.
On this page:
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:
- Open the standalone Configuration editor.
- Click the Severities tab.
- Click the text you want to change in the Name column.
- Type the new severity label. You can use alphanumeric characters, as well as space, minus, and underscore.
- Click OK and save your .pconffile somewhere you can find it.
To change the severity level of a checker:
- Open the standalone Configuration editor.
- On the Analysis Profile tab, expand an issue category to display the checker you want to change.
- Right-click the checker.
- In the pop-up menu, select Change Severity, and select a new severity level (for example, 2: Error).
- 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:
- Launch the Validate Portal and log in to Validate.
- In Validate's project list, click the project you want to upload the file to; The project details appear.
- Click Configuration.
- On the Configuration page, click Add a configuration file.
- In the Choose file dialog, browse to the location of your new .pconf file.
- Click Upload; your new Analysis Profile is now applied to that project.