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

Kwcreatechecker

kwcreatechecker creates custom checkers. kwcreatechecker is installed with the Command Line tools desktop analysis plug-in. For how-to information, see Writing custom C/C++ checkers or Writing custom Java checkers or Writing custom C# checkers.

Usage

kwcreatechecker --language <language> --type <checker_type> --code <checker_name>

Description

Checker stub files are generated with kwcreatechecker. The types of stub files depend on the language and type of checker specified. For KAST and Path checkers (C/C++ and Java), the stub files generated are:

  • checker configuration files (checkers.xml and help.xml)
  • build file (build.xml for Java, Makefile for C/C++ and Nmakefile for C#)

Additionally,

  • a test-case file is generated for C/C++, C# and Java KAST checkers
  • a logger file is generated for Java Path checkers to provide more debug information
  • a checker trigger file is generated for C/C++ Path checkers
Note: To run kwcreatechecker on Windows, you must have Visual Studio installed. Make files other than MS make are not supported on Windows.

Options

Name Description
--code <checker_name> specify the name for the checker. Acceptable characters are:
  • a to z
  • A to Z
  • 0 to 9
The code can't begin with a period, but a period can be used in the code itself. For example, MY.C.CHECKER.
Note: Multibyte characters are not supported in error IDs (checker names), and there's a 255-character limit.
--force force generation of the checker, even if the checker folder already exists
--help print help information
--kast-library <KAST-plugin-library-name> Specify the name of the library that contains the implementation of custom functions for KAST expressions.
Note: Applies only when the value for --type is kast.
In addition to the standard checker files (checkers.xml, a test-case file, help.xml, and a build file), separate files are created to contain the custom functions. For C/C++, this option creates a PluginSource.cpp file, a platform directory and a Make.Plugin file. For Java, the following files are created: MyFunc.java, plugin_functions.xml and a logger file.
--language <language> specify the language for the checker (cxx, cs or java)
--type <checker type>

specify the type of checker to create C/C++: kast or path C#: kast Java: sv, rlk, common or kast

See Writing custom C/C++ checkers, Writing custom C# checkers and Writing custom Java checkers for more information.

--version display kwcreatechecker version