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 .

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.