On Aug 23, 2008, at 00:05, Tom Browder wrote:
>> For day-to-day development, you can either _encourage_ developers
>> to use the
>> correct style in the future: this will be mostly automatic if your
>> tools
>> (editor) format the way you want.
>
> That's been the problem--no control over editor settings, and folks
> who have auto wrapping line editors that don't care about line
> lengths. Yuch!
>
>> And/or, you can add a pre-commit hook script that looks at each
>> file in a
>> commit: for each type to which your coding standards apply (i.e.
>> source
> ...
>> the same, the script dies with an error string "Source file XXXX is
>> not in
>> the correct coding style:" (you could also append the diff text
>> from the
>> compare). If you have a tool that just checks for coding style,
>> you can
>> also use that and die if it complains.
> ...
>
>> The second approach can be a little draconian.
>
> Yeah, but I bet it gets the attention of those with rogue editors.
Tom, it sounds like you're looking for a technical solution to a
social problem. That may not be the right way to approach the problem.
OTOH I've been burned by Eclipse's defaulting new workspaces to
*mixed* tabs-and-spaces for indentation more often than I care to
admit. *yuck*. A slap on the knuckles with the first commit would
have done me a world of good then.
// ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-23 21:18:08 CEST