feat: add pre-commit hook to check TODO|FIXME|FIX comment
This commit is contained in:
parent
cf005ff872
commit
2378a66114
4 changed files with 43 additions and 7 deletions
29
flake.nix
29
flake.nix
|
|
@ -254,14 +254,29 @@
|
|||
pkgs.writeShellScriptBin "pre-commit-run" script
|
||||
);
|
||||
|
||||
checks = forEachSystem (system: {
|
||||
pre-commit-check = inputs.git-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
nixfmt.enable = true;
|
||||
checks = forEachSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
pre-commit-check = inputs.git-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
nixfmt.enable = true;
|
||||
|
||||
check-comment = {
|
||||
enable = true;
|
||||
name = "check comment";
|
||||
entry = "${pkgs.callPackage ./githooks/check-comment.nix { }}";
|
||||
files = "\\.nix$";
|
||||
pass_filenames = false;
|
||||
stages = [ "pre-commit" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
devShells = forEachSystem (system: {
|
||||
default =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue