Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hindent doesn't end a file with a newline #211

Closed
jml opened this issue Aug 18, 2016 · 1 comment
Closed

hindent doesn't end a file with a newline #211

jml opened this issue Aug 18, 2016 · 1 comment

Comments

@jml
Copy link
Contributor

jml commented Aug 18, 2016

Don't know if this is deliberate or not, but it was pretty surprising to me and my preference would be to end with a newline.

$ hindent --version
hindent 4.6.3
$ hindent --style johan-tibell < Main.hs  > Main.hs.new
$ diff -u Main.hs Main.hs.new
--- Main.hs 2016-08-18 20:21:50.000000000 +0100
+++ Main.hs.new 2016-08-18 20:21:59.000000000 +0100
@@ -20,4 +20,4 @@
         Right comments ->
             mapM_
                 (putStrLn . Fixme.formatTodo)
-                (concatMap Fixme.getTodos comments)
+                (concatMap Fixme.getTodos comments)
\ No newline at end of file
@chrisdone
Copy link
Collaborator

I'll add a check that says if the original input ends with a newline, then we output with a newline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants