Deploying kwfilter.conf

By default, the kwfilter.conf file is located in the <klocwork_install>/config directory for both the server and the desktop analysis tools. To deploy a custom kwfilter.conf file to clients or desktop users, you'll need to copy your custom kwfilter.conf file into the projects_root/compiler_config directory, then run the kwdeploy command to deploy it to the server.

To deploy your compiler settings to a server project that has connected desktops:

  1. On the Validate server, under projects_root, create a directory called compiler_config and place a copy of the kwfilter.conf file that you want to deploy in the directory.
  2. On each build machine, run the kwdeploy sync command with the --url option specifying the Validate server host machine:
    kwdeploy sync [--url http(s)://<host>:<port>]
  3. The next time your desktop users run a Klocwork analysis either in the IDE, or by using Klocwork Desktop, the kwfilter.conf file will automatically deploy to their machines. Klocwork command line tool users will need to run the kwcheck sync command.

When the kwfilter.conf file is synced, a version of it is stored in the <klocwork_install>/synced/config directory. When you run kwinject, it searches for the kwfilter.conf file in the following locations, in order:

  1. ~/.klocwork/synced/config
  2. <klocwork_install>/synced/config
  3. <klocwork_install>/config

The system merges kwfilter.conf entries from each kwfilter.conf file. For example, when run, kwinject will pick up entries from both <klocwork_install>/synced/config/kwfilter.conf and <klocwork_install>/config/kwfilter.conf. kwinject will use the first entry it encounters that matches the compiler name.

If a user connects to a different server that maintains different compiler settings, the kwfilter.conf file is synced to the desktop and any local compiler config changes are synced using changes from the kwfilter.conf file on the server.

Related Topics Link IconSee also