Skip to content

Commit 7829238

Browse files
authored
Merge pull request ARMmbed#13469 from LDong-Arm/spellignore
Support ignore list for spell checks
2 parents 31701fa + 15914d9 commit 7829238

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed
File renamed without changes.

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ matrix:
125125
- >-
126126
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
127127
| ( grep '.*\.\(c\|cpp\|h\|hpp\)$' || true ) \
128-
| ( grep -v -f .astyleignore || true ) \
128+
| ( grep -v -f .codecheckignore || true ) \
129129
| while read file; do astyle -n --options=.astylerc "${file}"; done
130130
- git diff --exit-code --diff-filter=d --color
131131

@@ -135,11 +135,12 @@ matrix:
135135
install:
136136
- source_pkg aspell
137137
script:
138-
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers
139-
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform
140-
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events
141-
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos
142-
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh connectivity/netsocket
138+
# TODO: run checks on all directories once all mispellings are fixed
139+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers .codecheckignore
140+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform .codecheckignore
141+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events .codecheckignore
142+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos .codecheckignore
143+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh connectivity/netsocket .codecheckignore
143144

144145
- <<: *docs-vm
145146
name: "doxygen"

tools/test/travis-ci/doxy-spellchecker/spell.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ while read file; do
114114
echo "_________________________________"
115115
fi
116116

117-
done < <(find "${1}" -type d -iname "*target*" -prune -o -name '*.h' -print)
117+
# ${1}: directory to check
118+
# ${2}: file containing a list of paths (regex) to exclude
119+
done < <(find "${1}" -type d -iname "*target*" -prune -o -name '*.h' -print | grep -v -f "${2}")
118120

119121
echo "----------------------------------------------------------------------------------"
120122
echo "Total Errors Found: ${ERRORS}"

0 commit comments

Comments
 (0)