ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin van den Bemt" <m...@mvdb.com>
Subject RE: [Suggestion][New Task] Coding Standards / Code 'Beautifier'
Date Wed, 17 Jan 2001 19:21:41 GMT

This is a big issue even when developing commercial software. This guy uses
tabs, this one sorts the methods like this (va for java, does something
completely different and not controlable, btw..). As long as your working
with multiple developers and "coding" standards are hard for these people we
should use such a tool (if there any good ones exists, btw). I think on the
other hand, that this option should be optional. A lot of people are not
building the source with ant when developing (I do, but I'm far from being
standard..), but use there development tool. The formatting of sourcecode
should be done before a commit to cvs, else cvs is fucked (someone had a
commit today, he changed 1 line of code, cvs said : 980 lines changed!, just
because someone sorts the methods alphabatically).
So this functionality could be a (cvs) commit processing rule, a extension
to current development environments or a nice task in Ant, but not core to
Ant.

Just my opinion ;-))

Mvgr,
Martin van den Bemt
mvdb@mvdb.com

-----Original Message-----
From: Stuart Roebuck [mailto:stuart.roebuck@adolos.co.uk]
Sent: Wednesday, January 17, 2001 6:49 PM
To: ant-dev@jakarta.apache.org
Subject: [Suggestion][New Task] Coding Standards / Code 'Beautifier'


This is a cross-post from a discussion on the jakarta-james discussion list.

This has received a fairly welcome response from that list, but obviously it
relates to Ant, so could anyone who matters let me know whether this is of
interest, and whether I should pursue it.

Stuart.

> Following this post I've been doing some investigating.
>
> The code editing package jEdit <http://jedit.sourceforge.net/> uses an
optional
> JavaStyle plugin which automatically enforces most coding standards and
can be
> configured to various preferences. (By enforces, I mean that it
automatically
> reformats code to meet a standard, and can automatically do so on a whole
directory of
> source code.) The engine behind this is a PrettyPrinter by Chris Seguin
which is part of a
> collection of Java source code refactoring tools (JRefactory)
> <http://users.snip.net/~aseguin/cspretty.html>.  This code is currently
GPLd.
>
> I have had a brief correspondence with Chris to see what his reaction
would be to the idea of
> incorporating his code into Ant (and therefore expanding the license - if
my
> understanding of licenses is correct).  His response has been quite open
so far.
>
> My thought is, if we could add this tool to Ant we could provide an
automated mechanism for
> conforming any Apache project to a particular coding standard (including
dealing with
> those nasties like tabs vs. spaces).  The PrettyPrinter code also includes
facilities
> for producing default Javadoc comments for uncommented code matching
particular
> criteria (e.g. only public methods..).  This kind of automated conformance
seems such a
> nice idea for open source development.
>
> What would your reaction be to this idea?  Is it worth pursuing or have I
missed some
> practical limitation?
>
> Stuart.

If these seems generally a good idea, would anyone like to suggest an
appropriate task name and determine whether it should be optional or not.

I would propose "JavaStyle" as the task name, but, given its potential in
open source development I'd be inclined to suggestion non-optional (assuming
the license issues are resolvable).

Feedback?

Thanks,

Stuart.




-------------------------------------------------------------------------
Stuart Roebuck                                  stuart.roebuck@adolos.com
Lead Developer                               Java, XML, MacOS X, XP, etc.
ADOLOS                                             http://www.adolos.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org



Mime
View raw message