Code formatting

Ian Springer ian.springer at redhat.com
Wed Apr 4 12:53:44 UTC 2012


Talk about the kettle calling the pot black. Your code is littered with 
deviations from the team's conventions - just a few examples:

- 3-space indents
- tab indents
- cryptic 1-3 letter variable names
- brackets on newlines

Whatever coding style you're using, if you're using one at all, is not 
the RHQ coding style. Download this IntelliJ plugin 
(http://plugins.intellij.net/plugin/?idea&id=6546) and point it at these 
two files:

.settings/org.eclipse.jdt.core.prefs
.settings/org.eclipse.jdt.ui.prefs

and then reformat, and you will be using the same standards as the rest 
of the team.

I've reverted your changes to 
http://rhq-project.org/display/RHQ/Coding+Standards until they can be 
discussed. You can't just add random stuff to our coding conventions 
without discussing with the team first.

We informally decided on 2-space indent for XML a couple weeks ago on 
IRC. There was agreement from at least 5 or 6 devs and disagreement from 
nobody.

On 04/04/2012 04:39 AM, Heiko W.Rupp wrote:
> While I am not a big fan of our code formatting conventions of
>
> public some long signature that
>     wraps in the second line {
>     here thestatements begin without a space
>
> Can we please adhere to our freaking conventions? Perhaps change them slightly
> to make the above case look like:
>
> public some long signature that
>     wraps in the second line
> {
>     here thestatements begin and you can even see it
>
> BTW, the JBoss-guidelines that are referred in ours use
>
>     public void startService() throws Exception
>     {
>
> So I've adjusted our document
>
> I think for XML we never had the convention of using an indent of 2 spaces.
> It is fine with me, but then lets all do it.
>
> Also in Java we seem to randomly use 3 and 4 spaces; the JBoss guidelines
> use 3 spaces, so should we
>
> Current conventions are here:
>
> http://rhq-project.org/display/RHQ/Coding+Standards
>
>
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel


-- 
Ian Springer
Principal Software Developer
JBoss Operations Network
Red Hat
ian.springer at redhat.com



More information about the rhq-devel mailing list