[LLVMdev] svn pre-commit hook: help needed

Scott Michel scottm at aero.org
Fri Feb 20 14:10:32 PST 2009


On Feb 20, 2009, at 12:45 PM, Misha Brukman wrote:

> I've been fixing things on a directory-by-directory basis as I come  
> across style violations while browsing the code.  I'm not in favor  
> of a single global change to fix everything everywhere; I think  
> this can be done gradually over time and the diff will be easier to  
> read if it's smaller, so you can verify that the script (or your  
> editor) did not mangle anything.

I've got a fairly simple perl script that trims trailing whitespace  
and it's remarkably effective. It even works over recursive  
directories (not hard to do, but it's the way to do this globally.)  
I'm sure it's not too much of a stretch to translate tabs to spaces,  
although that's controversial.


-scooter



More information about the llvm-dev mailing list