Merge pull request #13469 from LDong-Arm/spellignore

Support ignore list for spell checks
pull/13460/head
Martin Kojtal 2020-08-21 14:29:33 +01:00 committed by GitHub
commit 7829238c61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 7 deletions

View File

@ -125,7 +125,7 @@ matrix:
- >-
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
| ( grep '.*\.\(c\|cpp\|h\|hpp\)$' || true ) \
| ( grep -v -f .astyleignore || true ) \
| ( grep -v -f .codecheckignore || true ) \
| while read file; do astyle -n --options=.astylerc "${file}"; done
- git diff --exit-code --diff-filter=d --color
@ -135,11 +135,12 @@ matrix:
install:
- source_pkg aspell
script:
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh connectivity/netsocket
# TODO: run checks on all directories once all mispellings are fixed
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers .codecheckignore
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform .codecheckignore
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events .codecheckignore
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos .codecheckignore
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh connectivity/netsocket .codecheckignore
- <<: *docs-vm
name: "doxygen"

View File

@ -114,7 +114,9 @@ while read file; do
echo "_________________________________"
fi
done < <(find "${1}" -type d -iname "*target*" -prune -o -name '*.h' -print)
# ${1}: directory to check
# ${2}: file containing a list of paths (regex) to exclude
done < <(find "${1}" -type d -iname "*target*" -prune -o -name '*.h' -print | grep -v -f "${2}")
echo "----------------------------------------------------------------------------------"
echo "Total Errors Found: ${ERRORS}"