From eacdd1887a60b956c0412e6454cf0d5b13a558aa Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Wed, 31 May 2023 02:55:36 +0900 Subject: [PATCH] Update tools/tidy.sh --- tools/tidy.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/tidy.sh b/tools/tidy.sh index ea269197..10f2a4c9 100755 --- a/tools/tidy.sh +++ b/tools/tidy.sh @@ -204,6 +204,7 @@ fi # Spell check (if config exists) if [[ -f .cspell.json ]]; then info "spell checking" + project_dictionary=.github/.cspell/project-dictionary.txt if type -P npm &>/dev/null; then has_rust='' if [[ -n "$(git ls-files '*Cargo.toml')" ]]; then @@ -227,7 +228,7 @@ if [[ -f .cspell.json ]]; then if [[ -n "${has_rust}" ]]; then dependencies_words=$(npx <<<"${dependencies}" cspell stdin --no-progress --no-summary --words-only --unique || true) fi - all_words=$(npx cspell --no-progress --no-summary --words-only --unique $(git ls-files | (grep -v '\.github/\.cspell/project-dictionary\.txt' || true)) || true) + all_words=$(npx cspell --no-progress --no-summary --words-only --unique $(git ls-files | (grep -v "${project_dictionary//\./\\.}" || true)) || true) # TODO: handle SIGINT echo "${config_old}" >.cspell.json cat >.github/.cspell/rust-dependencies.txt <