Code Style (DRAFT)

This page is the place where we collect and evaluate code style rules for Commons. The goal is to use this document as a base for a Commons wide Checkstyle configuration, and perhaps templates for IDE's as well.

Feel free to add new rules to the table below. The rules will be tagged, now or later, on its severity. The proposed tags are:

Rules

Severity

No tabs allowed in source files

error

Imports: No wildcards

error

Imports: Order by groups: java, javax, org, com

warning

Imports: Order in alphabetical order with a group

warning

Indentation: (Java) use 4 spaces

warning

Indentation: (POM) prefer 4 spaces, allow 2, but be consistent within a file (1)

info

Add your rule here

warning

Notes: 1. POMs tend to have quite deeply nested elements, and many elements can be long and awkward to wrap, so using 2 spaces is sometimes easier to read.

CodeStyle (last edited 2010-11-30 21:12:54 by sebbapache)