blob: aadb1709dd7d359cb33949861396d935b1340579 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{ pkgs, pre-commit-hooks, ... }:
with pkgs;
{
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = lib.cleanSource ../.;
hooks = {
nix-linter.enable = true;
nixpkgs-fmt.enable = true;
trailing-whitespace = {
enable = true;
entry =
"${pkgs.python3Packages.pre-commit-hooks}/bin/trailing-whitespace-fixer";
types = [ "text" ];
};
end-of-file-fixer = {
enable = true;
entry =
"${pkgs.python3Packages.pre-commit-hooks}/bin/end-of-file-fixer";
types = [ "text" ];
};
terraform-format = { enable = true; };
shellcheck = {
enable = true;
files = "\\.sh$";
types_or = [ "file" ];
};
};
};
}
|