3 ms·
I wrote a tool in this space as well, precious (https://github.com/houseabsolute/precious https://github.com/houseabsolute/precious). It's odd to me that these
by autarch 2y ago
I wrote a tool in this space as well, precious (https://github.com/houseabsolute/precious https://github.com/houseabsolute/precious). It's odd to me that these tools are often talked about with such a focus on Git hooks. Yes, that is definitely one use case, but I also want to run this sort of thing in CI to check PRs, and I _also_ want to run it locally to apply _pretty-printing_ to new code, rather than just having it check the code that I wrote.
I think hk does do all those things, but it's a bit obscured by the focus on Git hooks in the docs. But the docs are also still in a super early state, so maybe that will be fleshed out more in the future.
- srid 2y agoI use https://github.com/cachix/git-hooks.nix https://github.com/cachix/git-hooks.nix which provides all of it: - Pre-commit hook setup - Run locally anytime (`pre-commit run -a`) - Check in CI (as Nix flake check) Example repo: https://github.com/srid/haskell-template https://github.com/srid/haskell-template The pre-commit configuration: https://github.com/srid/haskell-template/blob/master/nix/modules/flake/pre-commit.nix https://github.com/srid/haskell-template/blob/master/nix/mod...