git-commit-guard 0.7.0__tar.gz → 0.8.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.
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/PKG-INFO +40 -1
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/README.md +39 -0
- git_commit_guard-0.8.0/htmlcov/.gitignore +2 -0
- git_commit_guard-0.8.0/htmlcov/class_index.html +161 -0
- git_commit_guard-0.8.0/htmlcov/coverage_html_cb_dd2e7eb5.js +735 -0
- git_commit_guard-0.8.0/htmlcov/favicon_32_cb_c827f16f.png +0 -0
- git_commit_guard-0.8.0/htmlcov/function_index.html +331 -0
- git_commit_guard-0.8.0/htmlcov/index.html +117 -0
- git_commit_guard-0.8.0/htmlcov/keybd_closed_cb_900cfef5.png +0 -0
- git_commit_guard-0.8.0/htmlcov/status.json +1 -0
- git_commit_guard-0.8.0/htmlcov/style_cb_9ff733b0.css +389 -0
- git_commit_guard-0.8.0/htmlcov/z_262b75d81d1cf686___init___py.html +454 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/src/git_commit_guard/__init__.py +88 -10
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/tests/test_git_commit_guard.py +179 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/.github/workflows/lint-commits.yml +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/.github/workflows/lint-md.yml +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/.github/workflows/test.yml +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/.gitignore +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/.pre-commit-hooks.yaml +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/.python-version +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/LICENSE +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/pyproject.toml +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/tests/__init__.py +0 -0
- {git_commit_guard-0.7.0 → git_commit_guard-0.8.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: git-commit-guard
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.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
|
|
@@ -101,6 +101,45 @@ Available checks:
|
|
|
101
101
|
* `signed-off` - `Signed-off-by:` trailer exists
|
|
102
102
|
* `signature` - Verify GPG or SSH signature
|
|
103
103
|
|
|
104
|
+
### Scope validation
|
|
105
|
+
|
|
106
|
+
By default any scope is accepted and scope is optional. Use `--scopes` to
|
|
107
|
+
restrict allowed values and `--require-scope` to enforce that a scope is always
|
|
108
|
+
present:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# only allow known scopes
|
|
112
|
+
commit-guard --scopes auth,api,db
|
|
113
|
+
|
|
114
|
+
# require a scope
|
|
115
|
+
commit-guard --require-scope
|
|
116
|
+
|
|
117
|
+
# combine both
|
|
118
|
+
commit-guard --scopes auth,api --require-scope
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Configuration file
|
|
122
|
+
|
|
123
|
+
Place `.commit-guard.toml` in your project root (or any parent directory) to
|
|
124
|
+
set defaults for `enable`, `disable`, `scopes`, and `require-scope`.
|
|
125
|
+
commit-guard searches upward from the working directory and uses the first file
|
|
126
|
+
found.
|
|
127
|
+
|
|
128
|
+
```toml
|
|
129
|
+
# .commit-guard.toml
|
|
130
|
+
disable = ["signature", "body"]
|
|
131
|
+
scopes = ["auth", "api", "db"]
|
|
132
|
+
require-scope = true
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
```toml
|
|
136
|
+
# .commit-guard.toml
|
|
137
|
+
enable = ["subject", "imperative"]
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
CLI flags (`--enable`, `--disable`, `--scopes`, `--require-scope`) take full
|
|
141
|
+
precedence and ignore config file values when provided.
|
|
142
|
+
|
|
104
143
|
### Checking a range of commits
|
|
105
144
|
|
|
106
145
|
```bash
|
|
@@ -80,6 +80,45 @@ Available checks:
|
|
|
80
80
|
* `signed-off` - `Signed-off-by:` trailer exists
|
|
81
81
|
* `signature` - Verify GPG or SSH signature
|
|
82
82
|
|
|
83
|
+
### Scope validation
|
|
84
|
+
|
|
85
|
+
By default any scope is accepted and scope is optional. Use `--scopes` to
|
|
86
|
+
restrict allowed values and `--require-scope` to enforce that a scope is always
|
|
87
|
+
present:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# only allow known scopes
|
|
91
|
+
commit-guard --scopes auth,api,db
|
|
92
|
+
|
|
93
|
+
# require a scope
|
|
94
|
+
commit-guard --require-scope
|
|
95
|
+
|
|
96
|
+
# combine both
|
|
97
|
+
commit-guard --scopes auth,api --require-scope
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Configuration file
|
|
101
|
+
|
|
102
|
+
Place `.commit-guard.toml` in your project root (or any parent directory) to
|
|
103
|
+
set defaults for `enable`, `disable`, `scopes`, and `require-scope`.
|
|
104
|
+
commit-guard searches upward from the working directory and uses the first file
|
|
105
|
+
found.
|
|
106
|
+
|
|
107
|
+
```toml
|
|
108
|
+
# .commit-guard.toml
|
|
109
|
+
disable = ["signature", "body"]
|
|
110
|
+
scopes = ["auth", "api", "db"]
|
|
111
|
+
require-scope = true
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```toml
|
|
115
|
+
# .commit-guard.toml
|
|
116
|
+
enable = ["subject", "imperative"]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
CLI flags (`--enable`, `--disable`, `--scopes`, `--require-scope`) take full
|
|
120
|
+
precedence and ignore config file values when provided.
|
|
121
|
+
|
|
83
122
|
### Checking a range of commits
|
|
84
123
|
|
|
85
124
|
```bash
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
5
|
+
<title>Coverage report</title>
|
|
6
|
+
<link rel="icon" sizes="32x32" href="favicon_32_cb_c827f16f.png">
|
|
7
|
+
<link rel="stylesheet" href="style_cb_9ff733b0.css" type="text/css">
|
|
8
|
+
<script src="coverage_html_cb_dd2e7eb5.js" defer></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body class="indexfile">
|
|
11
|
+
<header>
|
|
12
|
+
<div class="content">
|
|
13
|
+
<h1>Coverage report:
|
|
14
|
+
<span class="pc_cov">99%</span>
|
|
15
|
+
</h1>
|
|
16
|
+
<aside id="help_panel_wrapper">
|
|
17
|
+
<input id="help_panel_state" type="checkbox">
|
|
18
|
+
<label for="help_panel_state">
|
|
19
|
+
<img id="keyboard_icon" src="keybd_closed_cb_900cfef5.png" alt="Show/hide keyboard shortcuts">
|
|
20
|
+
</label>
|
|
21
|
+
<div id="help_panel">
|
|
22
|
+
<p class="legend">Shortcuts on this page</p>
|
|
23
|
+
<div class="keyhelp">
|
|
24
|
+
<p>
|
|
25
|
+
<kbd>f</kbd>
|
|
26
|
+
<kbd>n</kbd>
|
|
27
|
+
<kbd>s</kbd>
|
|
28
|
+
<kbd>m</kbd>
|
|
29
|
+
<kbd>x</kbd>
|
|
30
|
+
<kbd>c</kbd>
|
|
31
|
+
change column sorting
|
|
32
|
+
</p>
|
|
33
|
+
<p>
|
|
34
|
+
<kbd>[</kbd>
|
|
35
|
+
<kbd>]</kbd>
|
|
36
|
+
prev/next file
|
|
37
|
+
</p>
|
|
38
|
+
<p>
|
|
39
|
+
<kbd>?</kbd> show/hide this help
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</aside>
|
|
44
|
+
<form id="filter_container">
|
|
45
|
+
<input id="filter" type="text" value="" placeholder="filter...">
|
|
46
|
+
<div>
|
|
47
|
+
<input id="hide100" type="checkbox" >
|
|
48
|
+
<label for="hide100">hide covered</label>
|
|
49
|
+
</div>
|
|
50
|
+
</form>
|
|
51
|
+
<h2>
|
|
52
|
+
<a class="button" href="index.html">Files</a>
|
|
53
|
+
<a class="button" href="function_index.html">Functions</a>
|
|
54
|
+
<a class="button current">Classes</a>
|
|
55
|
+
</h2>
|
|
56
|
+
<p class="text">
|
|
57
|
+
<a class="nav" href="https://coverage.readthedocs.io/en/7.13.5">coverage.py v7.13.5</a>,
|
|
58
|
+
created at 2026-04-18 23:09 +0300
|
|
59
|
+
</p>
|
|
60
|
+
</div>
|
|
61
|
+
</header>
|
|
62
|
+
<main id="index">
|
|
63
|
+
<table class="index" data-sortable>
|
|
64
|
+
<thead>
|
|
65
|
+
<tr class="tablehead" title="Click to sort">
|
|
66
|
+
<th id="file" class="name" aria-sort="none" data-shortcut="f">File<span class="arrows"></span></th>
|
|
67
|
+
<th id="region" class="name" aria-sort="none" data-default-sort-order="ascending" data-shortcut="n">class<span class="arrows"></span></th>
|
|
68
|
+
<th class="spacer"> </th>
|
|
69
|
+
<th id="statements" aria-sort="none" data-default-sort-order="descending" data-shortcut="s">statements<span class="arrows"></span></th>
|
|
70
|
+
<th id="missing" aria-sort="none" data-default-sort-order="descending" data-shortcut="m">missing<span class="arrows"></span></th>
|
|
71
|
+
<th id="excluded" aria-sort="none" data-default-sort-order="descending" data-shortcut="x">excluded<span class="arrows"></span></th>
|
|
72
|
+
<th class="spacer"> </th>
|
|
73
|
+
<th id="coverage" aria-sort="none" data-shortcut="c">coverage<span class="arrows"></span></th>
|
|
74
|
+
</tr>
|
|
75
|
+
</thead>
|
|
76
|
+
<tbody>
|
|
77
|
+
<tr class="region">
|
|
78
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html#t44">src / git_commit_guard / __init__.py</a></td>
|
|
79
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html#t44"><data value='Check'>Check</data></a></td>
|
|
80
|
+
<td class="spacer"> </td>
|
|
81
|
+
<td>0</td>
|
|
82
|
+
<td>0</td>
|
|
83
|
+
<td>0</td>
|
|
84
|
+
<td class="spacer"> </td>
|
|
85
|
+
<td data-ratio="0 0">100%</td>
|
|
86
|
+
</tr>
|
|
87
|
+
<tr class="region">
|
|
88
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html#t72">src / git_commit_guard / __init__.py</a></td>
|
|
89
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html#t72"><data value='Level'>Level</data></a></td>
|
|
90
|
+
<td class="spacer"> </td>
|
|
91
|
+
<td>0</td>
|
|
92
|
+
<td>0</td>
|
|
93
|
+
<td>0</td>
|
|
94
|
+
<td class="spacer"> </td>
|
|
95
|
+
<td data-ratio="0 0">100%</td>
|
|
96
|
+
</tr>
|
|
97
|
+
<tr class="region">
|
|
98
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html#t86">src / git_commit_guard / __init__.py</a></td>
|
|
99
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html#t86"><data value='Result'>Result</data></a></td>
|
|
100
|
+
<td class="spacer"> </td>
|
|
101
|
+
<td>4</td>
|
|
102
|
+
<td>0</td>
|
|
103
|
+
<td>0</td>
|
|
104
|
+
<td class="spacer"> </td>
|
|
105
|
+
<td data-ratio="4 4">100%</td>
|
|
106
|
+
</tr>
|
|
107
|
+
<tr class="region">
|
|
108
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html#t218">src / git_commit_guard / __init__.py</a></td>
|
|
109
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html#t218"><data value='Args'>Args</data></a></td>
|
|
110
|
+
<td class="spacer"> </td>
|
|
111
|
+
<td>0</td>
|
|
112
|
+
<td>0</td>
|
|
113
|
+
<td>0</td>
|
|
114
|
+
<td class="spacer"> </td>
|
|
115
|
+
<td data-ratio="0 0">100%</td>
|
|
116
|
+
</tr>
|
|
117
|
+
<tr class="region">
|
|
118
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html">src / git_commit_guard / __init__.py</a></td>
|
|
119
|
+
<td class="name"><a href="z_262b75d81d1cf686___init___py.html"><data value=''><span class='no-noun'>(no class)</span></data></a></td>
|
|
120
|
+
<td class="spacer"> </td>
|
|
121
|
+
<td>212</td>
|
|
122
|
+
<td>2</td>
|
|
123
|
+
<td>0</td>
|
|
124
|
+
<td class="spacer"> </td>
|
|
125
|
+
<td data-ratio="210 212">99%</td>
|
|
126
|
+
</tr>
|
|
127
|
+
</tbody>
|
|
128
|
+
<tfoot>
|
|
129
|
+
<tr class="total">
|
|
130
|
+
<td class="name">Total</td>
|
|
131
|
+
<td class="name"> </td>
|
|
132
|
+
<td class="spacer"> </td>
|
|
133
|
+
<td>216</td>
|
|
134
|
+
<td>2</td>
|
|
135
|
+
<td>0</td>
|
|
136
|
+
<td class="spacer"> </td>
|
|
137
|
+
<td data-ratio="214 216">99%</td>
|
|
138
|
+
</tr>
|
|
139
|
+
</tfoot>
|
|
140
|
+
</table>
|
|
141
|
+
<p id="no_rows">
|
|
142
|
+
No items found using the specified filter.
|
|
143
|
+
</p>
|
|
144
|
+
</main>
|
|
145
|
+
<footer>
|
|
146
|
+
<div class="content">
|
|
147
|
+
<p>
|
|
148
|
+
<a class="nav" href="https://coverage.readthedocs.io/en/7.13.5">coverage.py v7.13.5</a>,
|
|
149
|
+
created at 2026-04-18 23:09 +0300
|
|
150
|
+
</p>
|
|
151
|
+
</div>
|
|
152
|
+
<aside class="hidden">
|
|
153
|
+
<a id="prevFileLink" class="nav" href=""></a>
|
|
154
|
+
<a id="nextFileLink" class="nav" href=""></a>
|
|
155
|
+
<button type="button" class="button_prev_file" data-shortcut="["></button>
|
|
156
|
+
<button type="button" class="button_next_file" data-shortcut="]"></button>
|
|
157
|
+
<button type="button" class="button_show_hide_help" data-shortcut="?"></button>
|
|
158
|
+
</aside>
|
|
159
|
+
</footer>
|
|
160
|
+
</body>
|
|
161
|
+
</html>
|