cachix / git-hooks.nix

Seamless integration of https://pre-commit.com git hooks with Nix.
Apache License 2.0
526 stars 154 forks source link

`stylish-haskell` "benign failures" #85

Open michaelpj opened 3 years ago

michaelpj commented 3 years ago

stylish-haskell exits 1 on files it can't deal with, with a typical example being anything containing CPP.

This is a "benign failure" in that it just means that it can't process the file. However, it has the effect of making the pre-commit hook fail.

I'm not sure quite what the right solution is:

domenkozar commented 3 years ago

I excluded files for ormolu when it didn't handle them.

You could write a script that checks for CPP pragma and write a list of files to exclude in JSON and then feed that to pre-commit.