This document documents the common coding conventions for all GLAST Java development. If a particular coding convention is not specified here, then it is the responsibility of the individual Project Lead to document those coding conventions that compliment thost enumerated below. Checkstyle is used to automate application of coding standards to Java projects, and is integrated with Maven and Cruise Control (our build and release manager). From the Checkstyle web site:
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.
Below is a list of coding conventions that are specific to Mevenide:
- Remove unused Imports
- Use fully qualified Imports
- Brackets on the same line
- Always use brackets
- Use explicit naming
- Methods should kept very short
- Remove unneeded javadoc
- Always provide class javadoc
- Use 4 spaces for tabs
If you commit code that does not follow these conventions, you are responsible for also fixing your own code.