[GRASS5] Towards a 5.1.0 experimental release

Glynn Clements glynn.clements at virgin.net
Thu Jul 3 04:17:00 EDT 2003


H Bowman wrote:

> > > >  1. Uniform coding style.
> [...]
> > > > Step 1 boils down to choosing a set of switches for the "indent"
> > > > program, then running indent on all source files.
> > > 
> > > Are you absolutely sure that this improves the situation
> > > in all cases? Please suggest a set of switches that Radmin
> > > and Markus agree with.
> > 
> > I have already suggested this month ago and proposed to use
> > the indent rule used by the Apache people (see grass5 archive,
> > can't find the ref now).
> > If you look at lib/image3/ you see an absolute nightmare of
> > code layout.
> 
> 
> Is this decided? (aka any objections?)
> If it is, can it be added to the SUBMITTING file?
> 
> Apache coding style:
>   http://www.apache.org/dev/styleguide.html
> 
> "This style can be generated with the following arguments to GNU indent:"
> -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1

I think that we should be more prescriptive, i.e. we should specify a
setting for most options. Also, we should specify either -bbo or
-nbbo, even if we don't intend to use -lN, so that authors know where
to break long boolean expressions.

FWIW, my preference would be:

-nbad -bap -bbb -nbbo -nbc -bl -bli0 -bls -cbi0 -ncdb -nce -ci4 -cli0
-ncs -d0 -di0 -fc1 -nfca -hnl -i4 -ip4 -l80 -lc80 -lp -npcs -pi4 -nprs
-npsl -sbi0 -sc -nsob -ss -ts8

However, much of that is arbitrary; I'll live with whatever is
ultimately chosen (except -ts8; that's a technical issue rather than a
preference).

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list