srid / haskell-template

Haskell project template using Nix + Flakes + VSCode (HLS)
https://srid.ca/haskell-template
MIT License
219 stars 31 forks source link

Add Githook for Code Formatting #33

Closed EvanPiro closed 5 days ago

EvanPiro commented 1 year ago

Putting auto-formatting on a per commit basis would save the developer time resolving formatting issues due to failing CI.

Getting something like the following in a githook would suffice: nix develop -c "treefmt"

srid commented 1 year ago

I wouldn't enable it by default, but we can add documentation (linked from README.md) explaining to the user how to do it ... possibly based on:

srid commented 1 year ago

Relevant: #36 (a nix check to make sure that source code was autoformatted).

srid commented 1 year ago

Relevant: https://github.com/numtide/treefmt/issues/78

srid commented 6 months ago

https://github.com/srid/haskell-flake/issues/136

srid commented 5 days ago

Closing in favour of https://github.com/srid/haskell-flake/issues/136