You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jeremias Maerki <je...@outline.ch> on 2001/06/21 22:38:57 UTC
Code conventions
Hi again
When looking at the FOP source I encounter a lot of inconsistencies
concerning tabs and spaces. Can we (or rather the committers) please
agree on how to configure our editors to produce good-looking code? I'd
like to propose prohibiting the use tabs, use an indentation level of 4
spaces and enable the removal of trailing whitespace. Thanks a lot!!!
Is there a document somewhere defining these things?
Jeremias Märki
mailto:jeremias.maerki@outline.ch
OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern
Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029
Internet http://www.outline.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: Code conventions
Posted by Weiqi Gao <we...@networkusa.net>.
On 22 Jun 2001 11:37:27 +0100, Alex McLintock wrote:
>
> My suggestion for this is that if you are editing a file and you
> see formating which needs doing you might like to do the
> formatting - submit a version into CVS, and then carry on with your
> changes - or Vice Versa.
> It is much easier for everyone if formatting changes appear in their
> own delta in cvs and not mixed up with serious code changes.
Or even better, designate a day for reformatting. You have a tool,
right? Announce in advance that, for example, July 1, 2001, will be
'format the source tree day'. Have everybody commit their changes
before that day. Run the tool on all *.java sources, commit that, and
be done with it.
--
Weiqi Gao
weiqigao@networkusa.net
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: Code conventions
Posted by Alex McLintock <al...@yahoo.com>.
> > Is there a document somewhere defining these things?
I thought there were java coding standards which covered the whole of
Apache Software Foundation? Hmmmm I suppose I ought to hunt for a URL.
The turbine people have discussed this to death - Since they are writing a Java
library (or suite of libraries) this is more important for them
than for FOP which can be thought of as a standalone tool.
> We actually did agree (a long time ago) to style all code with indenting of
> 4 spaces (no tabs) and braces on the same line as method etc.
This is fine - remember folks - it isn;t whether the standard is right or
wrong but whether we all stick to the standard.
> The tool to do this (as mentioned by Steve) is jstyle (which has some bugs)
> or astyle.
> All committers should make an effort to format a file when committing if it
> is inconsistent, of course this can make it difficult to understand diffs.
My suggestion for this is that if you are editing a file and you see
formating which needs doing you might like to do the formatting - submit
a version into CVS, and then carry on with your changes - or Vice Versa.
It is much easier for everyone if formatting changes appear in their
own delta in cvs and not mixed up with serious code changes.
Alex
What do I know? I'm not even a committer on FOP
=====
Alex McLintock alex@OWAL.co.uk Open Source Consultancy in London
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
DR WHO COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: Code conventions
Posted by Keiron Liddle <ke...@aftexsw.com>.
On Thu, 21 Jun 2001 22:38:57 Jeremias Maerki wrote:
> Hi again
>
> When looking at the FOP source I encounter a lot of inconsistencies
> concerning tabs and spaces. Can we (or rather the committers) please
> agree on how to configure our editors to produce good-looking code? I'd
> like to propose prohibiting the use tabs, use an indentation level of 4
> spaces and enable the removal of trailing whitespace. Thanks a lot!!!
>
> Is there a document somewhere defining these things?
We actually did agree (a long time ago) to style all code with indenting of
4 spaces (no tabs) and braces on the same line as method etc.
The tool to do this (as mentioned by Steve) is jstyle (which has some bugs)
or astyle.
All committers should make an effort to format a file when committing if it
is inconsistent, of course this can make it difficult to understand diffs.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org