You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-24Lines changed: 36 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,12 @@ It may work with other Python versions or operating systems (such as MacOS or WS
12
12
13
13
This repository provides the following pre-commit hooks:
14
14
15
-
-[dbg-check](#dbg-check) - ensure no `dbg` statements, macros or imports are included in the source code.
16
-
-[todo-check](#todo-check) - ensure no "todo"s or "fixme"s are left in the source code.
17
-
-[pragma-once](#pragma-once) - ensure all headers start with `#pragma once`.
18
-
-[check-merge-conflict](#check-merge-conflict) - check for merge conflicts.
19
-
-[mypy](#mypy) - run [MyPy](#https://github.com/python/mypy).
15
+
-[dbg-check](#dbg-check) - ensure no `dbg` statements, macros or imports are included in the source code.
16
+
-[todo-check](#todo-check) - ensure no "todo"s or "fixme"s are left in the source code.
17
+
-[pragma-once](#pragma-once) - ensure all headers start with `#pragma once`.
18
+
-[check-merge-conflict](#check-merge-conflict) - check for merge conflicts.
19
+
-[mypy](#mypy) - run [MyPy](#https://github.com/python/mypy).
20
+
-[spell-check-commit-msgs](#spell-check-commit-msgs) - check for spelling errors in commit messages.
20
21
21
22
### dbg-check
22
23
@@ -50,32 +51,43 @@ It allows you to pass in a requirements file using the `-r` or `--requirements-f
50
51
It requires that you have `pip` installed, but if you're using pre-commit, that shouldn't be an issue.
51
52
You can set the MyPy version in the requirements file (eg `mypy==1.17.1`), otherwise, the latest is installed.
52
53
54
+
### spell-check-commit-msgs
55
+
56
+
> _[If you] make spelling mistakes in commit messages, it's then a real pain to amend the commit._
57
+
> _And god forbid if you pushed._
58
+
59
+
This uses [`codespell`](https://github.com/codespell-project/codespell) under the hood, and accepts the same flags via the `args` field, but interactive mode is not supported.
60
+
`codespell` is installed via [`uv`](https://docs.astral.sh/uv/), so you need to have `pip` installed.
61
+
You also need to ensure that you install the `commit-msg` hooks, which you can do with `pre-commit install -t pre-commit -t commit-msg` or adding `default_install_hook_types: ["pre-commit", "commit-msg"]` to the `.pre-commit-config.yaml` (like below).
0 commit comments