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

Writing custom Java checkers

Which Java checker to create: KAST or Path?

The two types of Klocwork checkers work on different internal program representations and present different kinds of information. The two main types are:

  • Path checkers, which track Control and Data Flow
  • KAST checkers, which perform Code Style Analysis

Create a Path checker if finding a specific issue depends on:

  • following control flow and control flow paths
  • value tracking, or
  • constraints on values at certain execution points

On the other hand, KAST checkers are based on code structure analysis. Information about control flows is not available during KAST analysis.

Prerequisites

The Klocwork Extensibility Interface is installed as part of the Klocwork command line feature from the Klocwork Product Portal .

Mac users: You must have a working version of the GCC compiler to create custom checkers.

Java KAST checkers

The Java KAST checkers section describes how to create a custom Java KAST checker. It provides a description of a KAST checker, examples, a syntax reference, and a tutorial that walks you through the process of creating a KAST checker. See Creating Java KAST checkers for more information.

Java Path checkers

Likewise, the Java Path checkers section describes how to create a Path checker. See Creating Java Path checkers for more information.