<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <title>BonSAI overview</title> </head> <body> TODO add overview here ;) <h2>HACKING</h2> <p> A <a href="http://checkstyle.sourceforge.net">Checkstyle</a> configuration is provided in the root folder. Use this configuration whenever possible. Moreover the contained Eclipse project's auto formatter is adapted to fit this configuration. Use this, too. </p> <p> To execute checkstyle you can use <code>ant checkstyle</code>. </p> <p> The general coding guidelines are: <ul> <li>Use spaced instead of tabs.</li> <li>General indentation depth is 4 spaces.</li> <li>Everything except case-statements is indented.</li> <li>Curly braces are placed in the same line as the statement.</li> <li>Place one space between control statements and the opening brace (e.g. <code>for (foo)</code>).</li> <li>Comment everything that is not a private variable with a valid javadoc comment. Use <code>ant doc</code> to verify that the comments are valid. </li> <li>Every non final static variable must be private and encapsulated with getters and setters.</li> <li>If Checkstyle warns and this warning is really not an issue, include the lines that contain the warning in<br/> <code>// CHECKSTYLE:OFF why this is not an issue<br/> LINES LINES LINES<br/> // CHECKSTYLE:ON</code></li> </ul> </p> <h3>Unit Testing</h3> <p> The new BonSAI-core has a lot of more unit tests than the old one. The unit tests can be executed with <code>ant test</code>. Please write unit tests whenever possible. If <a href="http://cobertura.sourceforge.net/">Cobertura</a> is installed at your system, you can also use <code>ant coverage</code> to run the unit tests and generate a code coverage report. The report will be located under <code>reports</code>. </p> </body> </html>