Anatomy of a Java KAST checker
kwcreatechecker --language java --type kast --code <CHECKER.NAME>
This command creates four files in a checker directory. You specify the directory name with the --code option, which is mandatory.
The four files are:
- Testcase.java generates a sample test case; this where you put your own test case. See Testcase.java: Using a test case
- checkers.xml, which is where you put your KAST expressions AFTER you've tested them. This file also allows you to edit the title, error message, category, and severity for the checker. See checkers.xml: Java KAST configuration.
- help.xml, which is where you define your help information for the checker. See help.xml: Defining help for your checker.
- build.xml, which is the Ant build file
Note: If you used the --kast-library option, these additional files are created: