-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3857 from 3nids/spellingtest
Check spelling on travis
- Loading branch information
Showing
19 changed files
with
170 additions
and
65 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,16 @@ | ||
#!/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 | ||
|
||
./scripts/chkspelling_ag.sh $FILES | ||
|
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
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,41 @@ | ||
#!/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 | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
AGIGNORE=${DIR}/.agignore | ||
|
||
RE=$(cut -d: -f1 scripts/spelling.dat | tr '\n' '\|' | sed -e 's/|$//') | ||
if [ ! $# -eq 0 ]; then | ||
EXCLUDE=$(cat $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=$(unbuffer ag --smart-case --all-text --nopager --numbers --word-regexp --path-to-ignore $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
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
Oops, something went wrong.
49055c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems spellchecking causes Travis failures when PR removes some files, see for example https://travis-ci.org/qgis/QGIS/builds/184481431#L1400 or https://travis-ci.org/qgis/QGIS/builds/185214040#L1401
49055c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I noticed. Will fix this asap.