From 54eba3a42a6885c83fd360b4ebba8255dd55082a Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sun, 26 Jan 2025 05:29:21 +0400 Subject: [PATCH] pre-commit: Add the `codespell` hook Also, use it to spellcheck commit messages. --- .pre-commit-config.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 21e3db8284..89253ce705 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ # default_stages: [pre-commit] -default_install_hook_types: [pre-commit] +default_install_hook_types: [commit-msg, pre-commit] fail_fast: false # NOTE Exclude third-party sources and some files globally. # See `Utilities/Scripts/update-*.bash` scripts and @@ -85,3 +85,9 @@ repos: - id: sphinx-lint # NOTE Looks like `bad-dedent` gives too many false-positives. args: ['--disable', 'bad-dedent'] + + - repo: https://github.com/codespell-project/codespell + rev: v2.4.0 + hooks: + - id: codespell + stages: [commit-msg, pre-commit]