struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <grobme...@gmail.com>
Subject Re: Commiters info: coding conventions
Date Thu, 25 Aug 2011 12:47:41 GMT
yes, I am bit late on this e-mail.
Every project has different opinions on Code Conventions and
tabs/spaces. I would like to recommend to push this information to the
struts website somewhere. I could not easily find it online, but I
think it would help new developers to find their way.

Maybe there?
http://struts.apache.org/helping.html#contribute
Or there?
http://struts.apache.org/dev/builds.html

or even a new page like:
http://commons.apache.org/patches.html

best regards,
Christian


On Sat, Apr 23, 2011 at 1:23 PM, Rene Gielen <rgielen@apache.org> wrote:
> 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-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
http://www.grobmeier.de

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


Mime
View raw message