Skip to content

Commit 1303a1a

Browse files
authored
Merge pull request #206 from loicreynier/feat-add-cz
Add Commitizen
2 parents 607521b + 5f7721d commit 1303a1a

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
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 & 0 deletions
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
@@ -60,4 +61,5 @@
6061
terraform-fmt = callPackage ./terraform-fmt { };
6162
latexindent = texlive.combined.scheme-medium;
6263
chktex = texlive.combined.scheme-medium;
64+
commitizen = commitizen.overrideAttrs (_: _: { doCheck = false; });
6365
}

0 commit comments

Comments
 (0)