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

Format all .cabal files in the repo with a cabal formatter #4228

Open
fendor opened this issue May 13, 2024 · 3 comments
Open

Format all .cabal files in the repo with a cabal formatter #4228

fendor opened this issue May 13, 2024 · 3 comments
Labels

Comments

@fendor
Copy link
Collaborator

fendor commented May 13, 2024

As noticed in #4224 (comment), non-standard formatting can make it harder to read and .cabal file.

We have now at least two good options for formatting .cabal files that we both support in HLS itself:

  • cabal-gild
  • cabal-fmt

Perhaps we should start using these formatters in HLS and add new CI jobs that make sure all our .cabal files are formatted accordingly.

If the output of the formatter looks unwieldy to us, we should reach out to the projects and discuss improvements.

@fendor
Copy link
Collaborator Author

fendor commented May 13, 2024

Personally, I prefer the styling of cabal-fmt, but phadej/cabal-fmt#82 makes cabal-fmt more difficult to use from HLS directly. Thus, I am in favour of cabal-gild for formatting our .cabal files, but don't have any strong opinions right now.

@michaelpj
Copy link
Collaborator

Maybe open a PR that does the change so we can look at the diffs and discuss there?

@fendor
Copy link
Collaborator Author

fendor commented May 13, 2024

See #4229 and #4230

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

No branches or pull requests

2 participants