Developer Guide

February 18th, 2010 Leave a comment Go to comments


Workflow

What follows is a general discussion on the normal workflow for CIlib. The usage of the tools, however, is a whole topic on it’s own. It would be advisable to have a look at the Git website for documentation resources.

CIlib developers use a system similar to other open source communities. Changes supplied are provided though the submission of patches, based on the current master branch within the Git repository.

Conventions

This document describes how developers and contributors should write code to be included into the main CIlib tree. The reasoning behind these conventions is mainly for consistency, readability and maintainability.

General code style and convention

All working files within the source tree of CIlib should adhere to the following:

  • All source files must have the GPLv2 license header appended to the top of the file. Please note that CIlib will complete to build if the check for header information fails.
  • All trailing whitespaces must be removed.
    • Netbeans users should use the “Remove Trailing Whitespace” option under the “Source” menu item.
    • Eclipse users can use the Anyedit Eclipse Plugin to automatically remove trailing whitespace.
  • Unix End Of Line (EOL) characters are expected.
  • Four (4) spaces are expected for indentation, tab characters are not preferred as they may possibly be interpreted in many, many differing ways.
  • A column-width of up to 120 characters may be used.


Java code

The accepted Java code format is the same as outlined by Sun. All classes are expected to have the accompanying Javadoc comments for all publicly available methods.

Package level documentation should be added through the JDK5+ package-info.java package information.

An important note about the {@inheritDoc} tag: please do not use this tag for classes that are not in CIlib. For example, if you have a class that extends a class or implements an interface that is defined in the JDK, the {@inheritDoc} annotation will fail to generate the expected Javadoc. You should rewrite / paraphrase the Javadoc to make the intention apparent.

Citing references

References to information sources: All code that is written that is derived from a published article etc, will have the appropriate BibTeX entry in the class level Javadocs. The BibTeX reference should be placed in a <pre></pre> environment. Such references are extremely important and should be available in the Javadoc.

This page is wiki editable click here to edit this page.
  1. No comments yet.
  1. No trackbacks yet.

Spam Protection by WP-SpamFree