Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Not everybody will like all of the code style rules, but hopefully most people will like most of them. More important, by following these rules we will have a consistent codebase with all the aforementioned benefits. This is a "living document" and will be amended as we go along. When new issues arise, we will add them to this list.

IMPORTANT: Do not reformat code as part of a bug fix.  The makes more changes for code reviewers to track and review,  If you want to reformat a class, make a change set that has only formatting changes.  Do not reformat code that you do not own.

Whitespace

  1. No trailing whitespace. Most (all?) IDEs can be configured to automatically trim trailing whitespace
  2. Use Spaces not Tabs.
  3. Use 4 space indentation
  4. Keep the single empty line at the end of every file
  5. Insert a space between the Copyright notice and the package statement
  6. Insert a space between the package statement and any import statements
  7. There should be one space between the last import statement and the class documentation
  8. ...