Test the checker
- Deploy the custom checker to your desktop by extracting the zip file into the
<username>/.klocwork/plugins
directory, creating the directory if it doesn't already exist.If the C/C++ checker is platform-specific, the extracted files may include a subdirectory, for example,
<username>/.klocwork/plugins/ix86-pc-linux
or<username>/.klocwork/plugins/ix86-pc-win32
. - Set up a local project in the directory where you developed the checker.
kwcheck create -b <build_specification>
where<build_specification> was created with
make install buildspec
ornmake install buildspec
. By default, the build specification is written tokwinject.out
in the current working directory. - Run kwcheck to see if the issue is detected in your test case:
kwcheck run
Your checker will detect the issue from your test case.
When you're running thekwcheck
command repeatedly, usekwcheck
with the-r
option to make sure Klocwork doesn't skip files that have no apparent changes. - If you are satisfied with the results, you can deploy your checker to the server.
- Uninstall the checker from your desktop by deleting the files that you extracted in Step 1 from the
plugins
directory .