tweag / cooked-validators

MIT License
39 stars 11 forks source link

Introduce pre-commit hooks and flake checks #226

Closed Niols closed 1 year ago

Niols commented 1 year ago

This PR actually does a bunch of things:

Niols commented 1 year ago

First checks show that Ormolu and nixfmt hooks work fine, but not the hpack one, which is not that surprising considering. I will try to fix that in the next commits.

Niols commented 1 year ago

It turns out some of the .cabal files were git-ignored but also committed. A very annoying practice that, right now, cost me quite a long debug session. Anyhow, things should be fixed now, I'll run a few more tests.

Niols commented 1 year ago

We'll get there.

Niols commented 1 year ago

New round of tests.

Niols commented 1 year ago

Tests successful! If you have a look at the flake checks, you'll see that every time I “break” one of the files, the CI complains, as expected. As soon as they are back in sync, CI is happy.

Niols commented 1 year ago

I just opened the PR https://github.com/cachix/pre-commit-hooks.nix/pull/236 that should bring this fixed version of the hpack hook upstream. We will potentially iterate there on better versions but, eventually, we should settle things there. We can either wait for that to update the current PR or merge and update later on. Personally, I would go for the latter, especially considering that this PR introduces more than just the hpack hook.