lytlang/nix/checks.nix

28 lines
490 B
Nix
Raw Normal View History

{
pkgs,
git-hooks,
...
2025-02-21 07:51:02 -06:00
}:
let
check-command = command: {
enable = true;
name = command;
entry = command;
pass_filenames = false;
stages = [ "pre-commit" ];
};
in
{
git-hooks = git-hooks.lib.${pkgs.system}.run {
src = ./..;
hooks = {
2025-02-21 07:51:02 -06:00
nixfmt-rfc-style.enable = true;
cargo-check.enable = true;
convco.enable = true;
2025-02-21 07:51:02 -06:00
cargo-test = check-command "cargo test";
clippy.enable = true;
rustfmt.enable = true;
};
};
}