Switch to typos from cspell - no more npm

This commit is contained in:
Mike Farah
2026-06-07 20:09:44 +10:00
parent 91a166e8d8
commit 25dfcf280f
10 changed files with 87 additions and 333 deletions
+16 -1
View File
@@ -1,3 +1,18 @@
#!/bin/bash
npx cspell --no-progress "**/*.{sh,go,md}"
set -euo pipefail
GOPATH_TYPOS="$(go env GOPATH)/bin/typos"
TYPOS_CMD=""
if [ -f "${GOPATH_TYPOS}" ]; then
TYPOS_CMD="${GOPATH_TYPOS}"
elif command -v typos >/dev/null 2>&1; then
TYPOS_CMD="typos"
else
echo "Error: typos not found in $(go env GOPATH)/bin or PATH."
echo "Please run scripts/devtools.sh or ensure typos is installed correctly."
exit 1
fi
git ls-files '*.go' '*.sh' '*.md' | "${TYPOS_CMD}" --file-list -