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:
- On the Klocwork Server, under
projects_root
, create a directory calledcompiler_config
and place a copy of thekwfilter.conf
file that you want to deploy in the directory. - On each build machine, run the kwdeploy sync command with the
--url
option specifying the Klocwork Server host machine:kwdeploy sync [--url http(s)://<host>:<port>]
- 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 thekwcheck 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:
~/.klocwork/synced/config
<klocwork_install>/synced/config
<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.