Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
use Travis to look for spelling errors
use silver searcher for faster search (instead of grep)
- Loading branch information
Showing
11 changed files
with
163 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
export PATH=${HOME}/osgeo4travis/bin:${PATH} | ||
|
||
|
||
echo "Spell check" | ||
|
||
if [[ ! -z $TRAVIS_PULL_REQUEST_BRANCH ]]; then | ||
# if on a PR, just analyse the changed files | ||
echo "TRAVIS PR BRANCH: $TRAVIS_PULL_REQUEST_BRANCH" | ||
FILES=$(git diff --name-only HEAD $(git merge-base HEAD master) | tr '\n' ' ' ) | ||
fi | ||
|
||
|
||
CODE=$(./scripts/chkspelling_ag.sh) | ||
exit $CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Folders | ||
.build*/ | ||
ci/ | ||
debian/build.*/ | ||
debian/build*/ | ||
debian/.*/usr/ | ||
i18n/ | ||
ms-windows/osgeo4w/ | ||
python/ext-libs/ | ||
python/plugins/processing/algs/otb/ | ||
python/plugins/processing/algs/saga/ | ||
python/qsci_apis/ | ||
src/app/dwg/libdxfrw/ | ||
src/app/gps/qwtpolar-1.0/ | ||
src/app/gps/qwtpolar-1.1.1/ | ||
src/plugins/grass/qtermwidget/ | ||
|
||
#Extensions | ||
*.*.orig | ||
*.*.sortinc | ||
*.*.prepare | ||
|
||
|
||
#Specific files | ||
ChangeLog | ||
Exception_to_GPL_for_Qt.txt | ||
images/themes/default/svgbase/hammer.svg | ||
images/themes/default/propertyicons/general.svg | ||
LexerR.py | ||
spelling.dat | ||
resources/cpt-city-qgis-min/fme/metres/DESC.xml | ||
resources/cpt-city-qgis-min/wkp/schwarzwald/COPYING.xml | ||
tests/src/python/test_qgsserver_accesscontrol.py | ||
tests/testdata/qgis_server/ets-wms13/project.qgs | ||
tests/testdata/qgis_server_accesscontrol/project.qgs | ||
tests/testdata/qgis_server_accesscontrol/Hello.qml | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
########################################################################### | ||
# chkspelling.sh | ||
# --------------------- | ||
# Date : December 2016 | ||
# Copyright : (C) 2016 by Denis Rouzaud | ||
# Email : denis.rouzaud@gmail.com | ||
########################################################################### | ||
# # | ||
# This program is free software; you can redistribute it and/or modify # | ||
# it under the terms of the GNU General Public License as published by # | ||
# the Free Software Foundation; either version 2 of the License, or # | ||
# (at your option) any later version. # | ||
# # | ||
########################################################################### | ||
|
||
# optional arguments: files to be checked | ||
|
||
|
||
RE=$(cut -d: -f1 scripts/spelling.dat | tr '\n' '\|' | sed -e 's/|$//') | ||
if [ ! $# -eq 0 ]; then | ||
EXCLUDE=$(cat ci/travis/.agignore | sed -e 's/\s*#.*$//' -e '/^\s*$/d' | tr '\n' '|' | sed -e 's/|$//') | ||
FILES=$(echo $@ | tr -s '[[:blank:]]' '\n' | egrep -iv "$EXCLUDE" | tr '\n' ' ' ) | ||
echo "Running spell check on files: $FILES" | ||
else | ||
FILES="." | ||
fi | ||
|
||
|
||
exec 5>&1 | ||
OUTPUT=$(ag --smart-case --all-text --nopager --numbers --word-regexp --path-to-ignore scripts/.agignore "$RE" $FILES |tee /dev/fd/5) | ||
|
||
|
||
if [[ ! -z $OUTPUT ]]; then | ||
echo "Spelling errors have been found" | ||
exit 1 | ||
else | ||
exit 0 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters