[OpenAFS-devel] coding standards proposal

Derrick J Brashear shadow@dementia.org
Wed, 22 Jan 2003 20:40:07 -0500 (EST)


On 22 Jan 2003, Nathan Neulinger wrote:

> Is it stable? I know a few times I've run indent with certain sets of
> options, and it had a tendency to oscillate between two different
> outputs when run more than once. 

Theoretically.

> Looks like this option set appears stable (at least with a few files I
> tested) after you have run it once with the newlines option, and a
> second time without the newlines option. Subsequent runs appear stable. 

That was the idea.

> Resulting output I didn't like much:
> 
> {
>     int retVal;
>     H_LOCK retVal = MultiBreakCallBackAlternateAddress_r(host, afidp);
>     H_UNLOCK return retVal;
> }
> 
> There's a bunch of formatting artificacts with H_LOCK and H_UNLOCK
> elsewhere as well... We probably need to add semicolons to H_LOCK macro
> invocations. 

That should be possible; There are other lock macros which will have the
same problem.

> I'd like to see these added/changed, but neither is critical. 
> 
> 	-bad instead of -nbad (blank line after declarations)

i couldn't get a clear read on this one. since i couldn't, i pulled that
from the gnu coding standard's set of options.

> 	-ts4 instead of -ts8 (so tabs matches the indent spaces - otherwise,
> code is unreadable on a edit set with tabstop=4)

i had this argument with someone. he said the same. most editors are
configurable. note that -ts8 is the default, so if you don't specify,
that's what you get, and as i said, i looked at the code we got to pick
this stuff. ignoring configurable editors that haven't been so configured,
is there a good reason for this? alternately, have i mischaracterized the
code base we have? (this is a serious question, not bait)