Am I clear enough? I haven't had much sleep recently…
@Hecate Honestly, no. But maybe you had time to catch up on sleep?
I haven't set it up as a pre-commit hook yet as I don't fully understand it, but running it manually before a commit does only complain about unclean working state.
But the important thing here is that since it returns 1 as an exit code, it will abort the commit step and let you apply
stylish-haskell
on the incriminated files.
Do you mean that I then manually shall invoke stylish-haskell -i
on each Haskell file in the repo?
Couldn't I just let the pre-commit script make that do automatically, or are there edge cases where stylish messes up the not-yet-commited changes (e.g. syntax errors, incomplete implementations)?