Skip to content

Commit 49ffc6f

Browse files
committed
Add Commitizen
1 parent 607521b commit 49ffc6f

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ clang-format = {
171171
};
172172
```
173173

174+
## Git
175+
176+
- [commitizen](https://github.com/commitizen-tools/commitizen)
177+
174178
## Custom hooks
175179

176180
Sometimes it is useful to add a project specific command as an extra check that

modules/hooks.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,5 +739,14 @@ in
739739
types = [ "python" ];
740740
};
741741

742+
commitizen =
743+
{
744+
name = "commitizen check";
745+
description = ''
746+
Check whether the current commit message follows commiting rules.
747+
'';
748+
entry = "${tools.commitizen}/bin/cz check --allow-abort --commit-msg-file";
749+
stages = [ "commit-msg" ];
750+
};
742751
};
743752
}

nix/tools.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
, cargo
88
, clang-tools
99
, clippy
10+
, commitizen
1011
, deadnix
1112
, dhall
1213
, editorconfig-checker
@@ -45,7 +46,7 @@
4546
}:
4647

4748
{
48-
inherit actionlint alejandra cabal-fmt cabal2nix cargo clang-tools clippy deadnix dhall editorconfig-checker hadolint hindent hlint hpack html-tidy nix-linter nixfmt nixpkgs-fmt ormolu rustfmt shellcheck shfmt statix stylish-haskell stylua typos go mdsh revive;
49+
inherit actionlint alejandra cabal-fmt cabal2nix cargo clang-tools clippy commitizen deadnix dhall editorconfig-checker hadolint hindent hlint hpack html-tidy nix-linter nixfmt nixpkgs-fmt ormolu rustfmt shellcheck shfmt statix stylish-haskell stylua typos go mdsh revive;
4950
inherit (elmPackages) elm-format elm-review elm-test;
5051
# TODO: these two should be statically compiled
5152
inherit (haskellPackages) brittany fourmolu;

0 commit comments

Comments
 (0)