Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
The Server landing page js libraries are full of typos, so skip the s…
…pell check for these
  • Loading branch information
nyalldawson committed Aug 31, 2020
1 parent 403b214 commit 5f8bc43
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/spell_check/check_spelling.sh
Expand Up @@ -25,6 +25,9 @@
# extensions or files that should be excluded from file list if :% is appended in the spelling.dat file
EXCLUDE_SCRIPT_LIST='(\.(xml|svg|sip|pl|sh|qgs|badquote|cmake(\.in)?)|^(debian/copyright|cmake_templates/.*|tests/testdata/labeling/README.rst|tests/testdata/font/QGIS-Vera/COPYRIGHT.TXT|doc/NEWS\.html|debian/build/))$'

# always exclude these external files
EXCLUDE_EXTERNAL_LIST='(resources/server/api/ogc/static/landingpage/js/.*)$'

DIR=$(git rev-parse --show-toplevel)/scripts/spell_check

AGIGNORE=${DIR}/.agignore
Expand Down Expand Up @@ -160,6 +163,12 @@ for I in $(seq -f '%02g' 0 $((SPLIT-1)) ) ; do
echo "*** error: no file"
exit 1
fi

if [[ "$FILE" =~ $EXCLUDE_EXTERNAL_LIST ]]; then
echo "skipping external file $FILE for $(${GP}sed -r 's/\\//g' <<< $ERRORSMALLCASE)"
continue
fi

NUMBER=$(echo "$NOCOLOR" | cut -d: -f1)
ERRORLINE=$(echo "$NOCOLOR" | cut -d: -f2)
ERROR=$(echo "$LINE" | ${GP}sed -r 's/^.*?\x1B\[30;43m(.*?)\x1B\[0m.*?$/\1/')
Expand Down

0 comments on commit 5f8bc43

Please sign in to comment.