[OpenAFS-devel] coding standards proposal

Russ Allbery rra@stanford.edu
Thu, 23 Jan 2003 13:55:38 -0800


Neulinger, Nathan <nneul@umr.edu> writes:

> Actually, I would suggest having commitinfo return an error and message
> if the being-checked-in file is not identical to the output of indent on
> the same file. That would indicate that it didn't have proper
> indentation.

> Not sure if it should be an error or warning though. Probably just a
> warning though, as the file is bound to be reformatted again later.
> Warning should probably include a diff between the non-indented and
> indented versions, as it will be a good check for bad patches that have
> missing braces/etc. cause the diff will be enormous.

You don't want to do too much constant reformatting of a file, though,
since it really messes up cvs annotate when people make formatting changes
to unrelated portions of the file.  Ideally, you want to do the formatting
all at once and then enforce it with every subsequent check-in so that the
revision history continues to tell an accurate story except for a
discontinuity at the point where everything got reformatted.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>