Mladen Turk wrote:
> Hi,
>
> Looking at MINA sources I found out that the coding style is
> different from what I'm used to. Well, it's personal anyhow, but
> it should be important.
>
> Are there any rules for that?
> I have noticed few:
>
> 1. After each '(' there must be a space.
>    Exception is if next char is ')'
> 2. There must be a space before ')' except for #1
> 3. There must be a space after ')' unless it's a last char
> 4. Curly braces must be on the new line below the statement
> 5. Use spaces instead tabs
> 6. Use 4 spaces idents
> 7. Remove trailing spaces
> 8. Each for/if/else/try/catch/do/while block must have
>    curly braces even for a single statement.
>
> It would be great if there is some .indent file because
> I already noticed that there are some files that are
> starting to break those rules.
>
> Regards,
> Mladen.
>
>

Please have a look here:
http://mina.apache.org/developer-guide.html#DeveloperGuide-CodingConvention

Back when MINA was a sub-project of the directory project we used to
follow the conventions used by them. But as MINA became a top level
project we switched to Sun's Java Coding Conventions. There is still
code in there which haven't been reformatted yet. I think we decided to
only do that when we're updating a file (like fixing a bug or adding
features).

-- 
Niklas Therning
www.spamdrain.net

Reply via email to