You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Phil Steitz <ph...@steitz.com> on 2004/02/07 21:21:28 UTC

[site][all] Coding standards

I just noticed 
http://incubator.apache.org/directory/community/process/code-standards.html
which appears to apply to the whole project.  I don't want to start any 
holy wars here; but I would really prefer to keep using the Sun/Jakarta 
coding standards for the Naming stuff.  Can we maybe allow the different 
subprojects to follow different styles -- or just adopt the general 
"follow the conventions of the surrounding code" guideline?

Phil


RE: [site][all] Coding standards

Posted by "Noel J. Bergman" <no...@devtech.com>.
> > I just noticed
> >
http://incubator.apache.org/directory/community/process/code-standards.html

Here are the ones we use with James:
http://james.apache.org/code-standards.html.  Personally, I prefer that
braces be placed on separate lines as they were obviously intended to be
(;-)), but I also prefer if (cond) to if( cond ).

In any event, one thing that I see in the current guidelines is something
that I do recommend against.  There should not be @author tags, or if there
is one, it should be:

  @author <a href="mailto:directory-dev@incubator.apache.org">Apache
Directory Project</a>

We track commits via source control logs.  The only ownership/authorship for
code is the ASF.

> Let's all provide template files for use with Checkstyle and Jalopy.

If you want to enforce codestyle with tools, that's fine.  In the James
build process, we correct line endings and tabs before compiling to enforce
those guidelines.

	--- Noel


RE: [site][all] Coding standards

Posted by Alex Karasulu <ao...@bellsouth.net>.
Phil 

> I just noticed
> http://incubator.apache.org/directory/community/process/code-
> standards.html
> which appears to apply to the whole project.  I don't want to start any
> holy wars here; but I would really prefer to keep using the Sun/Jakarta
> coding standards for the Naming stuff.  Can we maybe allow the different
> subprojects to follow different styles -- or just adopt the general
> "follow the conventions of the surrounding code" guideline?

Sounds good to me - I actually prefer using the Jakarta standards
for API's but would like to use the Avalon-like standards we have for
things other than APIs like Eve code.  Every subproject should be allowed
manage its own standards.  

All I ask is one thing.  Let's all provide template files for use with
Checkstyle and Jalopy.  This way we can check and format any code
automatically and not worry about moving code.  If I have stuff to 
move out into the Naming area then I can format it and double check
it then give it back to you and vice versa if the need arises.

That way we can work in the format we like and just reformat to 
accommodate the subproject.  No need to do this immediately or anything
but it's a good thing to have if we're all going to use our own 
coding standards.

Alex