aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-05-09 18:48:10 +0200
committerEven Rouault <even.rouault@spatialys.com>2020-05-09 18:48:10 +0200
commitb7f8a012bfd11465af9f95c3d60101539a25219a (patch)
tree52ab65d8d68944ca9b6eb582064f372578e67636 /scripts
parentf291c50f17dcf4f4657aadbf8b4a38df6fa98731 (diff)
downloadPROJ-b7f8a012bfd11465af9f95c3d60101539a25219a.tar.gz
PROJ-b7f8a012bfd11465af9f95c3d60101539a25219a.zip
scripts/fix_typos.sh: fix URLs to dictionaries, and fix typos spotted
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fix_typos.sh26
-rw-r--r--scripts/typos_whitelist.txt1
2 files changed, 14 insertions, 13 deletions
diff --git a/scripts/fix_typos.sh b/scripts/fix_typos.sh
index d094f0f3..152ba550 100755
--- a/scripts/fix_typos.sh
+++ b/scripts/fix_typos.sh
@@ -32,22 +32,22 @@
if ! test -d fix_typos; then
# Get our fork of codespell that adds --words-white-list and full filename support for -S option
mkdir fix_typos
- cd fix_typos
- git clone https://github.com/rouault/codespell
- cd codespell
- git checkout gdal_improvements
- cd ..
- # Aggregate base dictionary + QGIS one + Debian Lintian one
- curl https://raw.githubusercontent.com/qgis/QGIS/master/scripts/spelling.dat | sed "s/:/->/" | grep -v "colour->" | grep -v "colours->" > qgis.txt
- curl https://anonscm.debian.org/cgit/lintian/lintian.git/plain/data/spelling/corrections| grep "||" | grep -v "#" | sed "s/||/->/" > debian.txt
- cat codespell/data/dictionary.txt qgis.txt debian.txt | awk 'NF' > gdal_dict.txt
- echo "difered->deferred" >> gdal_dict.txt
- echo "differed->deferred" >> gdal_dict.txt
- cd ..
+ (cd fix_typos
+ git clone https://github.com/rouault/codespell
+ (cd codespell && git checkout gdal_improvements)
+ # Aggregate base dictionary + QGIS one + Debian Lintian one
+ curl https://raw.githubusercontent.com/qgis/QGIS/master/scripts/spell_check/spelling.dat | sed "s/:/->/" | grep -v "colour->" | grep -v "colours->" > qgis.txt
+ curl https://salsa.debian.org/lintian/lintian/-/raw/master/data/spelling/corrections | grep "||" | grep -v "#" | sed "s/||/->/" > debian.txt
+ cat codespell/data/dictionary.txt qgis.txt debian.txt | awk 'NF' > gdal_dict.txt
+ echo "difered->deferred" >> gdal_dict.txt
+ echo "differed->deferred" >> gdal_dict.txt
+ grep -v 404 < gdal_dict.txt > gdal_dict.txt.tmp
+ mv gdal_dict.txt.tmp gdal_dict.txt
+ )
fi
EXCLUDED_FILES="*configure,config.status,config.sub,*/autom4te.cache/*,libtool,aclocal.m4,depcomp,ltmain.sh,*.pdf,./m4/*,./fix_typos/*,./docs/build/*,./src/*generated*,./test/googletest/*,./include/proj/internal/nlohmann/json.hpp,*.before_reformat"
-WORDS_WHITE_LIST="metres,als,lsat,twon,ang,PJD_ERR_LSAT_NOT_IN_RANGE,COLOR_GRAT,interm"
+WORDS_WHITE_LIST="metres,als,lsat,twon,ang,PJD_ERR_LSAT_NOT_IN_RANGE,COLOR_GRAT,interm,Interm,Cartesian,cartesian,CARTESIAN,kilometre,centimetre,millimetre,millimetres,Australia"
python3 fix_typos/codespell/codespell.py -w -i 3 -q 2 -S $EXCLUDED_FILES \
-x scripts/typos_whitelist.txt --words-white-list=$WORDS_WHITE_LIST \
diff --git a/scripts/typos_whitelist.txt b/scripts/typos_whitelist.txt
index 1dcd03dd..462d22da 100644
--- a/scripts/typos_whitelist.txt
+++ b/scripts/typos_whitelist.txt
@@ -1,2 +1,3 @@
$EXE +units=us-ft +init=${INIT_FILE}:404 -E -f '%.3f' >>${OUT} <<EOF
(`#404 <https://github.com/OSGeo/proj.4/issues/404>`_)
+{"CPM", "a=6375738.7", "rf=334.29", "Comm. des Poids et Mesures 1799"},