Disallow pushing of new trailing whitespace

Jan Stolarek jan.stolarek at p.lodz.pl
Thu Aug 29 12:52:47 CEST 2013


> The problem with these kind of commit-time checks is that you only find 
> out the problem *after* you've validated your nicely polished commits. 
This is easily solved by adding this line to .emacs file:

(add-hook 'before-save-hook 'delete-trailing-whitespace)

No more trailing whitespaces. Ever.

On the other hand problem with NOT having these kind of checks is that I'm seeing some trailing whitespaces appearing in modules that I have cleaned from trailing whitespaces! Which means that I have to spend time with `git add -i` and separating whitespace changes from other changes (or ignore policy about whitespace changes going in a separate commit).

Janek




More information about the ghc-devs mailing list