You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

The code style conventions used in the project are based on the style-guide defined of Fedora-3. They should prevent commits cluttered with format changes.

Formatting Rules

Here are the major rules:

  1. Four space indents for Java, and 2-space indents for XML. NO TABS
  2. K&R style braces

    if (code) {
      // code
    } else {
      // code
    }
    
  3. Do not use wildcard imports
  4. Write Javadocs for public methods and classes. Keep it short and to the point
  5. Avoid public instance variables; use accessors
  6. Use public methods sparingly; implementation details are not public
  7. Maximum length of lines is 80 characters.
  8. @Author

    /**
     * @author Joe Developer
     * Date: MMM DD, YYYY
     */
    public class MyClass

IDE Setups

IDE settings can be found in fcrepo4/etc in the project source.

  • No labels