From 32df5ad916626b0ddd6f0d980f350c6485f23867 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sat, 7 Feb 2015 14:28:42 -0500 Subject: Add Docs spellchecking Test. Not sure this is the best way to go, but it works. I'm not crazy about running the spellcheck against the built docs, but aspell has a builtin option to easily ignore everything in `` tags which greatly simplfies things. I looked at Doug Hellmans' sphinxcontrib-spelling package which does something similar for Sphinx. However, as Sphinx uses rST and the rST parser outputs a parse tree, Doug is essentially taking that parse tree and running the spellcheck on the appropriate parts (skipping code, etc.). He did a nice [writeup][5] of his development process if you are interested. As Python-Markdown's parse tree is represented as HTML (through ElementTree) I would have to use HTML anyway. And [PyEnchant][2] doesn't currently have good support for HTML. So I used [aspell][3], with inspiration from the [git-spell-check][4] hook. [1]: http://sphinxcontrib-spelling.readthedocs.org/en/latest/index.html [2]: https://pythonhosted.org/pyenchant/ [3]: http://aspell.net/ [4]: https://github.com/mprpic/git-spell-check [5]: http://doughellmann.com/2011/05/26/creating-a-spelling-checker-for-restructuredtext-documents.html --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 89ec558..cd0bbef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,11 @@ env: - TOXENV=py34 - TOXENV=pypy - TOXENV=flake8 + - TOXENV=checkspelling before_install: - sudo apt-get update -qq - sudo apt-get install libtidy-0.99-0 + - sudo apt-get install aspell install: - pip install tox - pip install coveralls -- cgit v1.2.3