tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
938 stars 83 forks source link

Make it clear that configuration files must end with a newline #1122

Closed mngrm3a closed 4 weeks ago

mngrm3a commented 1 month ago

Is your feature request related to a problem? Please describe. .ormolu files need to end with a newline or the config parser will fail. This isn't clear from the README. It's not a big deal when ormolu is being used from the shell. But when running as a library in hls, it's not immediately obvious what is causing the formatter to fail.

Describe the solution you'd like Make the parser more lenient or add a hint to the readme.

Describe alternatives you've considered

Additional context

amesgen commented 1 month ago

Thanks for the report, it sounds simplest to just allow trailing newlines :+1: Opened #1123 for that.