mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-02 23:34:48 +08:00
Switch to typos from cspell - no more npm
This commit is contained in:
+16
-1
@@ -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 -
|
||||
|
||||
Reference in New Issue
Block a user