Skip to content

Commit 098d56c

Browse files
committed
Add Commitizen
1 parent 32dcd71 commit 098d56c

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
@@ -169,6 +169,10 @@ clang-format = {
169169
};
170170
```
171171

172+
## Git
173+
174+
- [commitizen](https://github.com/commitizen-tools/commitizen)
175+
172176
## Custom hooks
173177

174178
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
@@ -674,5 +674,14 @@ in
674674
types = [ "file" ];
675675
};
676676

677+
commitizen =
678+
{
679+
name = "commitizen check";
680+
description = ''
681+
Check whether the current commit message follows commiting rules.
682+
'';
683+
entry = "${tools.commitizen}/bin/cz check --allow-abort --commit-msg-file";
684+
stages = [ "commit-msg" ];
685+
};
677686
};
678687
}

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)