Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

Deploying custom checkers

To deploy a custom checker, you can do either of the following:

  • Deploy the checker deployment package to the server and any build machines. You use the kwdeploy command to deploy custom checkers to the Klocwork Server, making them available to any connected desktops through synchronization.
  • Deploy the package to your desktop, typically for checker testing purposes. Desktop-only deployments do not use the kwdeploy command, and are accomplished by putting the checker deployment package into the appropriate folder. KAST checkers with custom functions and C/C++ Path checkers require manual installation on the desktop because synchronization doesn’t push .dll or .so files to the desktop from the server or vice-versa.

Checker deployment packages

Deploying checkers starts with the checker deployment package. A checker deployment package is a jar or zip file archive that contains the files created when you built the custom checker. A checker deployment package contains the files required to:

  • display the checker in the Configuration Editor for integration projects and in the Configuration Editor for any connected desktops, so that users can enable or disable the new checker
  • detect the specific C/C++, C# or Java issue type
  • display issue help for the checker in Klocwork
  • display issue help for the checker in C/C++, C# or Java checker reference at http://<klocwork_server_host>:<klocwork_server_port>/documentation. Klocwork Documentation is available only if your organization has a server installation of Klocwork.
  • display the appropriate message and title for the checker in the analysis results in Klocwork and the Klocwork plug-ins

When deploying a custom checker, you'll need to know whether it’s a Java, C/C++, or C# checker, and if it's a C/C++ checker, determine whether it's platform-specific. Typically, C/C++ checkers are platform-specific, however, C/C++ KAST checkers that do not use custom functions are platform-independent. Check the contents of the checker deployment package (ZIP file) to see if it contains platform subdirectories at the top level. If the package contains platform subdirectories at the top level, the checker is platform-specific. You also need to decide whether you want the checker to be disabled before deployment.

Checker deployment package contents

The contents of a checker deployment package vary depending on whether the checker is a KAST or Path checker, and also whether it is a C/C++ or Java checker. C/C++ checkers are contained in a ZIP file; Java checkers are contained in a JAR file.

The JAR for a Java Path or KAST checker contains the following files and folders:

Filename or folder Description
<CHECKER.CODE>.jkb Contains the knowledge base file that defines the checker behavior for Java Path checkers only.
checkers.xml Is the checker configuration, which by default has the checker enabled for analysis. This is the file you need to access if you want to disable the checker before deployment.
toc.xml, <CHECKER.CODE>.htm, etc. Contains the checker’s help files converted into a format understandable by Klocwork, as well as Klocwork Documentation at http://<klocwork_server_host>:<klocwork_server_port>/documentation.

The ZIP for a C/C++ KAST or Path checker contains the following files and folders:

Filename or folder Description
<CHECKER.NAME>.xml is the checker configuration, which by default has the checker enabled for analysis. This is the file you need to access if you want to disable the checker before deployment.
<CHECKER.NAME>.jar contains the checker’s help files converted into a format understandable by Klocwork, as well as Klocwork Documentation at http://<klocwork_server_host>:<klocwork_server_port>/documentation.
<platform directory> the platform directory if the checker is a Path checker or is a KAST checker that uses custom functions. The platform directory should contain the plug-in library ( .so or .dll). The possible subdirectories are:
  • ix86-pc-win32
  • ix86-pc-linux
  • sparc-sun-solaris2
  • powerpc-ibm-aix
  • ix86-apple-macosx

The ZIP for a C# KAST checker contains the following files and folders:

Filename or folder Description
<CHECKER.NAME>.xml is the checker configuration, which by default has the checker enabled for analysis. This is the file you need to access if you want to disable the checker before deployment.
<CHECKER.NAME>.jar contains the checker’s help files converted into a format understandable by Klocwork, as well as Klocwork Documentation at http://<klocwork_server_host>:<klocwork_server_port>/documentation.