Add pre-commit hooks

This commit is contained in:
Dave Gallant
2021-01-24 16:19:48 -05:00
parent 088d3bca8f
commit 822c40cb4a
8 changed files with 73 additions and 57 deletions

12
default.nix Normal file
View File

@@ -0,0 +1,12 @@
let
nix-pre-commit-hooks = import (builtins.fetchTarball
"https://github.com/cachix/pre-commit-hooks.nix/tarball/master");
in {
pre-commit-check = nix-pre-commit-hooks.run {
src = ./.;
hooks = {
shellcheck.enable = true;
nixfmt.enable = true;
};
};
}