The .pre-commit-config.yaml file has been updated with
the cspell hook entry.
The cspell hook was added as a local hook (since cspell is installed on the system) and placed after file format checks but before code linting hooks:
- repo: local
hooks:
- id: cspell
name: cspell
entry: cspell
language: system
types: [text]
files: \.md$
exclude: CHANGELOG\.md
args: [--config, .cspell.json]
The hook appears in the correct location:
check-toml hook (line 14 in
pre-commit-hooks)ruff-check hook (line 31 in
ruff-pre-commit)$ pre-commit run check-yaml --files .pre-commit-config.yaml
check yaml...............................................................Passed
$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
pre-commit installed at .git/hooks/pre-push
pre-commit installed at .git/hooks/commit-msg
$ pre-commit run cspell --all-files
cspell...................................................................Passed
CSpell: Files checked: 2, Issues found: 0 in 0 files.
The hook successfully checks markdown files and excludes CHANGELOG.md as configured.
The hook runs in the correct order:
.pre-commit-config.yaml - Confirmedfiles: \.md$exclude: CHANGELOG\.md.pre-commit-config.yaml with cspell hook
entry