From 8f4dd0558e102826744f3176df15dc90047517c1 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sat, 4 Jan 2025 23:05:44 +0400 Subject: [PATCH] pre-commit: Add the `typos` hook for extra spellchecking Also, use it to spellcheck commit messages. --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89253ce705..a7ec2226b4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -91,3 +91,12 @@ repos: hooks: - id: codespell stages: [commit-msg, pre-commit] + + - repo: https://github.com/crate-ci/typos + rev: v1.29.4 + hooks: + - id: typos + # NOTE Override hook's default args to prevent automatic + # fixing of found typos. Let the dev decide what to fix! + args: ['--force-exclude'] + stages: [commit-msg, pre-commit]