By incident I realized that some commits lately introduced tab
characters for indentation. Generally there is nothing wrong with this,
except that there is a historic agreement that we want to favor space
character over tabs for the Struts codebase - which is a hard to find
information for new committers, I have to admit.

As for code style in general we follow the official Java Code
Conventions [1], which leaves open whether to use tab or space
characters. The main reasons why both the original Struts project as
well as the WebWork project - which was merged into the Struts project
as the base for Struts 2 - agreed on a "no tab character" convention are

- commit messages are generally more readable with spaces
- while the Java Coding Conventions [1] allow for both types of
indentation, they request an indent unit of 4 spaces as well as a tab
width of 8 spaces. To follow both rules, one would have to mix tabs and
spaces for each odd number of indents if the tab character were to be used.

The good thing is that nowadays with IDEs like Eclipse, Netbeans or IDEA
it's just a tick in a preference box to change that style for your
commits. As for IDEA eg. you can create profiles if your daily coding
convention differs from the project's.

As a side note, Jetbrains and other commercial tool providers kindly
support open source with free licenses. With your Apache email address
it is very simple to apply for those licenses - so if you ever wanted to
try one of those products, this is a good chance.

[1] http://www.oracle.com/technetwork/java/codeconvtoc-136057.html

- René

-- 
René Gielen
http://twitter.com/rgielen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to