We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7c6434 commit 0b52028Copy full SHA for 0b52028
2 files changed
commit-msg.sh
@@ -0,0 +1,3 @@
1
+#!/usr/bin/env bash
2
+
3
+conform enforce --commit-msg-file \$1
flake.nix
@@ -48,11 +48,22 @@
48
# --------------------------------------
49
# Hooks: use the default company-wide git hooks
50
51
- hooks = {extraModulesPath, ...}: {
+ hooks = {
52
+ extraModulesPath,
53
+ pkgs,
54
+ ...
55
+ }: let
56
+ nixpkgs' = nixpkgs.${pkgs.system};
57
+ in {
58
inherit _file;
59
imports = ["${extraModulesPath}/git/hooks.nix"];
60
git.hooks.enable = true;
61
git.hooks.pre-commit.text = builtins.readFile ./pre-commit.sh;
62
+ git.hooks.commit-msg.text = builtins.readFile ./commit-msg.sh;
63
+ packages = with nixpkgs'; [
64
+ conform
65
+ editorconfig-checker
66
+ ];
67
};
68
69
0 commit comments