ray/ci/lint/check-banned-words.sh
Amog Kamsetty 7a3ccb93ee
[CI] Separate out banned words check from formatting script (#23998)
The recursive grep in the banned words check can get really messy when running locally depending on each person's directory structure or where the format script is being called from.

Separates the banned words check as a separate script so that it's not called by default in ./format.sh. Also adds this to the documentation
2022-04-19 13:30:37 -07:00

16 lines
No EOL
495 B
Bash
Executable file

#!/usr/bin/env bash
# Checks Python and doc files for common mispellings.
BANNED_WORDS="RLLib Rllib"
echo "Checking for common mis-spellings..."
for word in $BANNED_WORDS; do
if grep -R --include="*.py" --include="*.rst" "$word" .; then
echo "******************************"
echo "*** Misspelled word found! ***"
echo "******************************"
echo "Please fix the capitalization/spelling of \"$word\" in the above files."
exit 1
fi
done