git-commit-guard 0.4.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ ---
2
+ - id: commit-guard
3
+ name: commit-guard
4
+ description: >-
5
+ Opinionated conventional commit message linter
6
+ with imperative mood detection
7
+ entry: commit-guard --message-file
8
+ language: python
9
+ stages: [commit-msg]
10
+ always_run: true
11
+ pass_filenames: true
12
+ minimum_pre_commit_version: 2.8.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-commit-guard
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Opinionated conventional commit message linter with imperative mood detection
5
5
  Project-URL: Homepage, https://github.com/benner/commit-guard
6
6
  Project-URL: Repository, https://github.com/benner/commit-guard
@@ -27,11 +27,33 @@ Unlike regular expression only tools, commit-guard uses
27
27
  NLP (nltk POS tagging) to verify that commit descriptions start with an
28
28
  imperative verb.
29
29
 
30
+ ## Example
31
+
32
+ ```bash
33
+ $ commit-guard
34
+ ✗ subject does not match 'type(scope): description': Merge pull request #5 from fix/branch
35
+ ✗ missing 'Signed-off-by' trailer
36
+ ✗ commit is not signed (GPG/SSH)
37
+ ```
38
+
30
39
  ## Installation
31
40
 
41
+ From PyPI:
42
+
43
+ ```bash
44
+ uv tool install git-commit-guard
45
+ ```
46
+
47
+ or:
48
+
49
+ ```bash
50
+ pipx install git-commit-guard
51
+ ```
52
+
53
+ From a local clone:
54
+
32
55
  ```bash
33
56
  uv tool install -e .
34
- commit-guard
35
57
  ```
36
58
 
37
59
  During development:
@@ -92,6 +114,32 @@ git rev-list --no-merges origin/main..HEAD | while read -r rev; do
92
114
  done
93
115
  ```
94
116
 
117
+ ### pre-commit
118
+
119
+ Add to your `.pre-commit-config.yaml`:
120
+
121
+ ```yaml
122
+ ---
123
+ repos:
124
+ - repo: https://github.com/benner/commit-guard
125
+ rev: v0.1.0
126
+ hooks:
127
+ - id: commit-guard
128
+ ```
129
+
130
+ Install the hook:
131
+
132
+ ```bash
133
+ pre-commit install --hook-type commit-msg
134
+ ```
135
+
136
+ To selectively enable or disable checks, pass `args`:
137
+
138
+ ```yaml
139
+ - id: commit-guard
140
+ args: ["--enable", "subject,imperative"]
141
+ ```
142
+
95
143
  ## Imperative mood detection
96
144
 
97
145
  commit-guard combines two strategies to detect non-imperative descriptions:
@@ -6,11 +6,33 @@ Unlike regular expression only tools, commit-guard uses
6
6
  NLP (nltk POS tagging) to verify that commit descriptions start with an
7
7
  imperative verb.
8
8
 
9
+ ## Example
10
+
11
+ ```bash
12
+ $ commit-guard
13
+ ✗ subject does not match 'type(scope): description': Merge pull request #5 from fix/branch
14
+ ✗ missing 'Signed-off-by' trailer
15
+ ✗ commit is not signed (GPG/SSH)
16
+ ```
17
+
9
18
  ## Installation
10
19
 
20
+ From PyPI:
21
+
22
+ ```bash
23
+ uv tool install git-commit-guard
24
+ ```
25
+
26
+ or:
27
+
28
+ ```bash
29
+ pipx install git-commit-guard
30
+ ```
31
+
32
+ From a local clone:
33
+
11
34
  ```bash
12
35
  uv tool install -e .
13
- commit-guard
14
36
  ```
15
37
 
16
38
  During development:
@@ -71,6 +93,32 @@ git rev-list --no-merges origin/main..HEAD | while read -r rev; do
71
93
  done
72
94
  ```
73
95
 
96
+ ### pre-commit
97
+
98
+ Add to your `.pre-commit-config.yaml`:
99
+
100
+ ```yaml
101
+ ---
102
+ repos:
103
+ - repo: https://github.com/benner/commit-guard
104
+ rev: v0.1.0
105
+ hooks:
106
+ - id: commit-guard
107
+ ```
108
+
109
+ Install the hook:
110
+
111
+ ```bash
112
+ pre-commit install --hook-type commit-msg
113
+ ```
114
+
115
+ To selectively enable or disable checks, pass `args`:
116
+
117
+ ```yaml
118
+ - id: commit-guard
119
+ args: ["--enable", "subject,imperative"]
120
+ ```
121
+
74
122
  ## Imperative mood detection
75
123
 
76
124
  commit-guard combines two strategies to detect non-imperative descriptions: