[MLton] Tabs in source files

Vesa Karvonen vesa.karvonen@cs.helsinki.fi
Fri, 19 Aug 2005 17:24:28 +0300


Quoting Matthew Fluet <fluet@cs.cornell.edu>:
> > Quoting Henry Cejtin <henry.cejtin@sbcglobal.net>:
> > > I agree that once you avoid #1 (any tabs or spaces) that #3 (no tabs) is
> > > far better.  The problem is how to enforce it.  It is easy to forget.
> > 
> > AFAIK, SVN also has some support for running scripts to verify commits,
> > but I haven't used it previously. 
> 
> Sure, but you can use the scripts to either

I didn't claim it would be a panacea... ;-)

> a) reject a commit with tabs or b) fix a commit with tabs.  Of course,
> if you choose b), we're back in the same boat: what does a tab mean?

Judging from the e-mails on this topic, converting an indentation tab to
8 spaces should be fine with all the people on this list who either can't
or don't want to change their editor settings.

> And if you choose a), frequent committers quickly get annoyed.

A third option would be to allow the commit, but log/notify the violation
in some way.

I would probably go with option b + notification of some sort. A
commit would always be accepted, but if the file contains indentation
tabs, then they would be converted to spaces and a notification of the
conversion would be sent to the committer in a way or another. However,
I don't know whether this is achievable with SVN.

-Vesa Karvonen