diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-01-19 15:12:19 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2017-01-19 15:59:38 +0100 |
commit | 19064623bc6ff2b1cd104cd08b2ddc15141ec761 (patch) | |
tree | d6821dbe49e570c055b3e941d34c0e54f3903d8a /prepare-release | |
parent | b11718ad17bc4073a007e50a766f873b4a7fb72a (diff) | |
download | apt-19064623bc6ff2b1cd104cd08b2ddc15141ec761.tar.gz |
add a helper to call codespell & spellintian
We don't want to call these on po-files and such and even then they
contain a bunch of false positives which we should better filter out
or looking at the output is too daunting.
Gbp-Dch: Ignore
Diffstat (limited to 'prepare-release')
-rwxr-xr-x | prepare-release | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/prepare-release b/prepare-release index 0004de310..8c4e0978b 100755 --- a/prepare-release +++ b/prepare-release @@ -215,6 +215,69 @@ elif [ "$1" = 'coverage' ]; then 'apt-inst' 'apt-inst/deb' 'apt-inst/contrib' 'apt-private' done genhtml --output-directory "${DIR}" "${DIR}/apt.coverage.fixed" ${LCOVRC} +elif [ "$1" = 'spellcheckers' ]; then + echo '### codespell in source directories:' + codespell --enable-colors $(find . -mindepth 1 -maxdepth 1 -type d \! -name '.git' \! -name 'doc' \! -name 'po' \! -name 'build' \! -name 'test') | \ + grep -v '^.*debian/changelog.*Troup.*==>.*Troupe.*$' || true + echo '### codespell in testcases:' + codespell $(find test -type f \! -name 'status-*' \! -name 'Packages-*' \! -name '*.deb' \! -name '*.sec' \! -name '*.pub' \! -name '*.db') + echo '### codespell in documentation:' + codespell doc/*.xml doc/*.txt doc/*.dbk doc/*.ent doc/*.cmake.in doc/xml.add doc/po4a.conf doc/examples doc/po/apt-doc.pot po/apt-all.pot README.* COPYING + + echo '### spellintian in source directories:' + { + for DIR in $(find . -mindepth 1 -maxdepth 1 -type d \! -name '.git' \! -name 'doc' \! -name 'po' \! -name 'build' \! -name 'test'); do + spellintian $(find "$DIR" -type f) + done + } | grep -v \ + -e '^.*: long long (duplicate word) -> long$' \ + -e '^./apt-pkg/pkgcache.h: ID ID (duplicate word) -> ID$' \ + -e '^./apt-pkg/contrib/mmap.cc: WorkSpace WorkSpace (duplicate word) -> WorkSpace$' \ + -e '^./apt-pkg/contrib/md5.cc: z z (duplicate word) -> z$' \ + -e '^./apt-pkg/metaindex.cc: const const (duplicate word) -> const$' \ + -e '^./apt-pkg/acquire-method.cc: QueueBack QueueBack (duplicate word) -> QueueBack$' \ + -e '^./CMake/Translations.cmake: domain domain (duplicate word) -> domain$' \ + -e '^./CMake/apti18n.h.in: m m (duplicate word) -> m$' \ + -e '^./CMake/run_if_exists.sh: fi fi (duplicate word) -> fi$' \ + -e '^./ftparchive/byhash.cc: ByHash ByHash (duplicate word) -> ByHash$' \ + -e '^./ftparchive/writer.cc: this Packages -> these packages$' \ + -e '^./ftparchive/byhash.h: ByHash ByHash (duplicate word) -> ByHash$' \ + -e '^./cmdline/apt-key.in: done done (duplicate word) -> done$' \ + -e '^./cmdline/apt-key.in: fi fi (duplicate word) -> fi$' \ + -e '^./cmdline/apt-key.in: echo echo (duplicate word) -> echo$' \ + -e '^./triehash/.travis.yml: perl perl (duplicate word) -> perl$' \ + -e '^./triehash/README.md: Performance Performance (duplicate word) -> Performance$' \ + -e '^./debian/apt.apt-compat.cron.daily: fi fi (duplicate word) -> fi$' \ + -e '^./debian/apt.auto-removal.sh: done done (duplicate word) -> done$' \ + -e '^./debian/apt.systemd.daily: fi fi (duplicate word) -> fi$' \ + -e '^./debian/apt.postinst: fi fi (duplicate word) -> fi$' \ + -e '^./methods/http.cc: Sz Sz (duplicate word) -> Sz$' \ + -e '^./methods/ftp.cc: AFMap AFMap (duplicate word) -> AFMap$' \ + -e '^./dselect/install: fi fi (duplicate word) -> fi$' \ + || true + echo '### spellintian in testcases:' + spellintian $(find test -type f \! -name 'status-*' \! -name 'Packages-*' \! -name '*.deb' \! -name '*.sec' \! -name '*.pub' \! -name '*.db') \ + | grep -v \ + -e '^.*: long long (duplicate word) -> long$' \ + -e '^test/integration/.*: fi fi (duplicate word) -> fi$' \ + -e '^test/integration/.*: done done (duplicate word) -> done$' \ + -e '^test/integration/.*: echo echo (duplicate word) -> echo$' \ + -e '^test/integration/test-00-commands-have-help: moo moo (duplicate word) -> moo$' \ + -e '^test/integration/test-apt-cache: bar bar (duplicate word) -> bar$' \ + -e '^test/integration/test-sourceslist-trusted-options: everythingsucceeds everythingsucceeds (duplicate word) -> everythingsucceeds$' \ + -e '^test/integration/test-sourceslist-trusted-options: everythingfails everythingfails (duplicate word) -> everythingfails$' \ + -e '^test/integration/test-apt-get-changelog: foo foo (duplicate word) -> foo$' \ + -e '^test/integration/test-ubuntu-bug-761175-remove-purge: testround testround (duplicate word) -> testround$' \ + -e '^test/integration/test-apt-get-download: apt apt (duplicate word) -> apt$' \ + -e '^test/integration/test-apt-showlist-orgroup-in-recommends: zzz zzz (duplicate word) -> zzz$' \ + -e '^test/integration/test-bug-691453-apt-cache-search-multi-pattern: bar bar (duplicate word) -> bar$' \ + -e '^test/integration/test-allow: hold hold (duplicate word) -> hold$' \ + -e '^test/integration/test-apt-by-hash-update: ensureitsbroken ensureitsbroken (duplicate word) -> ensureitsbroken$' \ + -e '^test/integration/test-apt-source-and-build-dep: foo foo (duplicate word) -> foo$' \ + || true + echo '### spellintian in documentation:' + spellintian doc/*.xml doc/*.txt doc/*.dbk doc/*.ent doc/*.cmake.in doc/xml.add doc/po4a.conf doc/examples/* doc/po/apt-doc.pot po/apt-all.pot README.* COPYING + else echo >&1 "Usage:\t$0 pre-export \t$0 pre-build @@ -242,6 +305,11 @@ Both will format the diff properly. used by .travis.yml. »coverage« does a clean build with the right flags for coverage reporting, runs all tests and generates a html report in the end. + +\t$0 spellcheckers + +»spellcheckers« runs »codespell« and »spellintian« on the appropiate files and +filters out obvious false positives. " fi |