Skip to content

Commit de68c27

Browse files
authored
Merge pull request #8138 from sylvestre/cspell-precommit
Make cspell pre-commit hook optional with skip message
2 parents e1f40ff + 3c29c77 commit de68c27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repos:
3737
language: system
3838
- id: cspell
3939
name: Code spell checker (cspell)
40-
description: Run cspell to check for spelling errors.
41-
entry: cspell --no-must-find-files --
40+
description: Run cspell to check for spelling errors (if available).
41+
entry: bash -c 'if command -v cspell >/dev/null 2>&1; then cspell --no-must-find-files -- "$@"; else echo "cspell not found, skipping spell check"; exit 0; fi' --
4242
pass_filenames: true
4343
language: system

0 commit comments

Comments
 (0)