Skip to content

Commit

Permalink
nix: add pre-commit-check
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Dec 24, 2021
1 parent 9e2743c commit 06402ea
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
49 changes: 49 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
url = "github:edolstra/flake-compat";
flake = false;
};
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
#lvar = {
# url = "github:srid/lvar";
# flake = false;
Expand Down Expand Up @@ -68,6 +69,17 @@
# Used by `nix build`
defaultPackage = ema;

checks = {
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
hlint.enable = true;
nixpkgs-fmt.enable = true;
ormolu.enable = true;
};
};
};

# Used by `nix develop`
devShell = emaProject true;
});
Expand Down

0 comments on commit 06402ea

Please sign in to comment.