Table of Contents |
---|
...
...
You can also find usefull and step-to-step guide on how to develop and run custom rules in the following posts of Kiuwan Blog
- Rules development (I): Where do we start?
- Rules development (II): basis for implementation
- Rules development (III): debugging custom rules
- Rules development (IV): Basic API – navigating through the AST
- Rules development (V): Query API
Prerequisites
...
...
...
The same prerequisites that apply to Kiuwan Local Analyzer apply to Kiuwan Rule Developer, please check them out before continuing to the next section.
All in all, you will need two tools for rule development:
- Kiuwan Rule Developer. This is included with the latest Kiuwan Local Analyzer.
- A code editor you feel comfortable with. This can be your favourite IDE, like Eclipse, iDEA or a text editor like Vi or Emacs.
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Kiuwan Rule Developer allows you to remotely debug the rule you are editing in your IDE while it is being executed.
If you want to debug your rules, you should launch Kiuwan Rule Developer in debug mode. To do so, open a console and type:
Windows:
> AGENT_HOME/bin/agent --development debugPort=4444
Unix:
> AGENT_HOME/bin/agent.sh --development debugPort=4444
This will launch Kiuwan Rule Developer and wait for a remote debug tool to be attached on the specified port (in the previous examples, port is 4444).
Note that the application will not be launched until the remote debug tool is detected by the process. Make sure the specified debug port matches the one configured in your remote debug tool. If the attachment is successful, you will see a red label indicating the current debugging port in the bottom left of the Rule Developer window:
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
In our example, one violation has been detected in one file, as we can see in the analysis overview:
...
...
...
...
...
...
...
...
...