Closed peternewman closed 2 years ago
I'd recommend Codespell: https://github.com/codespell-project/codespell
Steps to run it via CI:
pip install git+https://github.com/codespell-project/codespell.git SPELLINGBLACKLIST=$(cat <<-BLACKLIST -wholename "./.codespellignore" -or \ -wholename "./.git/*" BLACKLIST ) # run codespell only if it is the requested task spellingfiles=$(eval "find ./ -type f -and ! \( \ $SPELLINGBLACKLIST \ \) | xargs") # count the number of codespell errors spellingerrors=$(zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" --exclude-file .codespellignore -L thead,hsi $spellingfiles 2>&1 | wc -l) if [[ $spellingerrors -ne 0 ]]; then # print the output for info zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" --exclude-file .codespellignore -L thead,hsi $spellingfiles echo "Found $spellingerrors spelling errors via codespell" exit 1; else echo "Found $spellingerrors spelling errors via codespell" fi;
I'd have just added it, but I'm more of a Travis than a Circle kind of guy.
this was done.
I'd recommend Codespell: https://github.com/codespell-project/codespell
Steps to run it via CI:
I'd have just added it, but I'm more of a Travis than a Circle kind of guy.