Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#5378) Automatic style enforcement
Home

[Freeciv-Dev] Re: (PR#5378) Automatic style enforcement

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: dspeyer@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#5378) Automatic style enforcement
From: "Cameron Morland" <cameron@xxxxxxxxxx>
Date: Fri, 19 Sep 2003 10:37:31 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, Sep 19, 2003 at 09:36:03AM -0700, John Wheeler wrote:
> [glip - Fri Sep 19 12:44:18 2003]:
> 
> > On Wed, 17 Sep 2003, Daniel L Speyer wrote:
> > 
> > > OK, the "if("s are fixed.  That's all I found for remaining style 
> > > errors.  This whole style thing is getting really annoying.  Has 
> > > anyone written some tools to help with it?
> > 
> > I don't know any such tools unfortunately.  I think Raimar had
> > something.
> 
> Would 'indent' work? (http://www.gnu.org/directory/indent.html)

The use of indent is discussed in the website somewhere, but I get the
impression that it is undesirable to change all the code, since this
would break any work in progress that people have. It would be a
one-time cost, provided patches weren't allowed in with incorrect
indentation.

I was thinking that a way around this would be to write a script
(perl, sed, what have you) that could be applied to patches to point
out or correct things not conforming to the style guide. (This script
would have to be _right_, since if heavily used it would become the de
facto style guide).

I haven't started writing such a script, though I might. You're very
welcome to beat me to it. :)

-- 
+-----------------------------------------------------------------
| PGP http://www.eng.uwaterloo.ca/student/cjmorlan/public-key.pgp
| Cameron Morland             ----             Cameron@xxxxxxxxxx
|
| There is never any money for the public good because the society 
| is based entirely upon measurable self-interest.
|     --John Ralston Saul
+-----------------------------------------------------------------

Attachment: pgpL1OcVzrm7m.pgp
Description: PGP signature


[Prev in Thread] Current Thread [Next in Thread]