mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00

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
16 lines
No EOL
495 B
Bash
Executable file
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 |