Skip to content

Commit

Permalink
run spell check on edited files only
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jan 20, 2017
1 parent 5c5bcf7 commit 4175c1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ci/travis/check_spelling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ 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 --diff-filter=AM --name-only $(git merge-base HEAD master) | tr '\n' ' ' )
else
echo "TRAVIS COMMIT RANGE: $TRAVIS_COMMIT_RANGE"
FILES=$(git diff --diff-filter=AM --name-only ${TRAVIS_COMMIT_RANGE/.../..} | tr '\n' ' ' )
fi

./scripts/spell_check/check_spelling.sh -r $FILES
1 change: 1 addition & 0 deletions scripts/spell_check/check_spelling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ declare -A GLOBREP_CURRENTFILE=()
declare -A GLOBREP_IGNORE=()

for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
printf "Progress: %d/%d\n" $I $SPLIT
SPELLFILE=spelling$I~

# if correction contains an uppercase letter and is the same as the error character wise, this means that the error is searched as a full word and case sensitive (not incorporated in a bigger one)
Expand Down

0 comments on commit 4175c1e

Please sign in to comment.