Anatomy of a Java Path checker
The kwcreatechecker command creates five files in the checker directory. You specify the checker directory name with the --code option, which is mandatory. Three of these files are stubs that require user input. The most crucial of these stub files is the knowledge base file.
The three files that require updating are:
- <CHECKER.CODE>.jkb, which is the knowledge base file where you define the checker behavior; see Knowledge base entries
- checkers.xml, which is where you define the title, error message, category, and severity for the checker; see checkers.xml: Defining the category, severity, and error message
- help.xml, which is where you define your help information for the checker; see help.xml: Defining help for your checker
The two other files that are generated, but don't require manual input are:
- logger.xml, which unlocks logger information produced by kwjava about the code analyzed by the Path checker, as well as knowledge base parameters that were applied, such as sources and sink. You can use this output to debug and improve your knowledge base.
- build.xml, which is the Ant build file.