Introducing Cobra

David Brown kplug at davidb.org
Wed Jan 2 16:07:17 PST 2008


On Wed, Jan 02, 2008 at 03:48:10PM -0800, SJS wrote:

>If you require tabs-for-indentation-not-spaces, you ought to be able to
>insert a pre-commit check to look for such things.

Unfortunately, I don't have easy access to that.  Plus we have a very large
depo with very different kinds of source in it.

>Lessee... from start of line to first non-whitespace character there
>should be only tabs... so a regex like "^\t* +[^ ].*$" would be a reason
>to reject the commit.

Git comes with a demo pre-commit hook that looks for trailing whitespace,
space followed by tab, and unresolved merge conflicts.  Sadly, there's
already a lot of trailing whitespace in our files, inserted by the same
editor that has no problem turning tabs into spaces.

>Thus, my habit of disallowing tabs in source files, as enforced by the
>VCS.

I'm not that picky about which, just choose one.  Actually, although I
don't mind tabs for indenting, they do need to be tabs for indenting.  It's
the mixing that messes things up.

Dave



More information about the KPLUG-LPSG mailing list