bittide / bittide-hardware

17 stars 1 forks source link

Add `fourmolu` as a formatter #548

Closed martijnbastiaan closed 1 month ago

martijnbastiaan commented 3 months ago

See discussion at https://github.com/clash-lang/clash-protocols/pull/79. Ideally this would be easy to integrate into git hooks for people that want that. Like for clash-protocols: let's follow fourmolu's opinions as much as possible. The point is to be consistent, not to impose yet another style to get used to.

rowanG077 commented 3 months ago

The format.sh script in diff mode is basically designed to be be used as the git pre-commit. I did play around with it a little bit on the protocols PR but in the end did not introduce it because commit a pre-commit hook requires everyone to configure it manually. Personally I configure my editor to run the formatter on save.