yesodweb/yesod — pull request #249 by chreekat (2012-01-31 19:54:12+00:00)
Title: Newline at ends of scaffold files.

So this may not be super critical, but I didn't like that a bunch of scaffolded files
had no final eol. vim seems to think that's a problem, and vim's opinion is good
enough for me.

So here's what this commit does:

Scaffolding.CodeGen.codegenDir no longer removes the final eol. Input files that
had extra eols have had them removed. With these changes, the generated files
are now more identical to the inputs:

$ diff foo/LICENSE scaffold/LICENSE.cg
4c4
< Copyright 2012, foo. All rights reserved.
---
> Copyright ~year~, ~name~. All rights reserved.

Additionally, initial commits of changes to a new project's files aren't
littered with "\ No newline at end of file". Maybe other people don't have this
problem, but vim auto-adds eols to files that lack them. Here, for example,
is a commit to my project where I tried to get it all out of the way up front.
Ideally I wouldn't have to do this:

commit ce34468190ea87b91eb3b1a9b7987f40d49cf97e
Author: Bryan Richter
Date: Fri Jan 27 22:59:57 2012 -0800

Adds newlines to files that need em.

Foundation.hs | 2 +-
Handler/Root.hs | 2 +-
Import.hs | 2 +-
config/models | 2 +-
config/postgresql.yml | 2 +-
config/settings.yml | 2 +-