diff options
-rw-r--r-- | .spell-dict | 118 | ||||
-rw-r--r-- | .travis.yml | 2 | ||||
-rwxr-xr-x | checkspelling.sh | 32 | ||||
-rw-r--r-- | tox.ini | 6 |
4 files changed, 157 insertions, 1 deletions
diff --git a/.spell-dict b/.spell-dict new file mode 100644 index 0000000..148c7dd --- /dev/null +++ b/.spell-dict @@ -0,0 +1,118 @@ +Abrahamsen +Altmayer +API +Artem +Babelmark +backtick +backticks +Balogh +BlockParser +Blockprocessor +Blockprocessors +blockquote +blockquotes +CamelCase +Chodarev +CLI +CodeHilite +Cogumbreiro +CSS +Dmitry +ElementTree +extendMarkdown +Fauske +Formatter +Fortin +GitHub +Gruber +GSoC +hacky +HeaderId +HTTPS +implementers +InlineProcessor +Jiryu +JSON +Kjell +Krech +kwargs +Limberg +Magne +MAILTO +makeExtension +Manfed +markdownFromFile +Maruku +multi +MultiMarkdown +munge +namespace +NanoDOM +Neale +nosetests +OrderedDict +OrderedDicts +OSX +Ph +PHP +Postprocessor +Postprocessors +Preprocessor +Preprocessors +Pygments +PyPI +PyPy +PYTHONPATH +PyTidyLib +PyYAML +rc +refactor +refactored +refactors +registerExtension +RSS +rST +ryneeverett +sanitizer +sanitizers +Sauder +schemeless +Sergej +serializer +serializers +Shachnev +slugify +SmartyPants +Sourceforge +StackOverflow +Stansifer +stdout +Stelios +Stienstra +subclasses +svn +Swartz +Szakmeister +Takteyev +Tiago +tokenized +tox +Trac +traceback +Tredinnick +Treeprocessor +Treeprocessors +tuples +unordered +untrusted +UTF +uTidylib +versa +Waylan +WikiLink +WikiLinks +Wolever +Xanthakis +XHTML +YAML +Yunusov 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 diff --git a/checkspelling.sh b/checkspelling.sh new file mode 100755 index 0000000..4ae20cc --- /dev/null +++ b/checkspelling.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +echo "Building docs..." +python setup.py --quiet build_docs --force +echo "Compiling Dictionary..." +aspell --lang=en create master ./tmp <.spell-dict +echo "Checking spelling...\n" + +let "fails=0" + +for file in $(find build/docs/ -type f -name "*.html"); do + words=$(aspell list --lang=en --mode=html --add-html-skip=code --extra-dicts=./tmp <$file) + if [ "$words" ]; then + uniquewords=$(tr ' ' '\n' <<< "${words[@]}" | sort -u | tr '\n' ' ') + let "fails++" + echo "Misspelled words in '$file':" + echo "-----------------------------------------------------------------" + for word in ${uniquewords[@]}; do + echo $word + done + echo "-----------------------------------------------------------------" + fi +done +rm -f ./tmp +rm -rf build + +if [ $fails -gt 0 ]; then + echo "$fails files with misspelled words." + exit 1 +else + exit 0 +fi @@ -1,5 +1,5 @@ [tox] -envlist = py27, py32, py33, py34, pypy, flake8 +envlist = py27, py32, py33, py34, pypy, flake8, checkspelling [testenv] downloadcache = {toxworkdir}/cache @@ -11,5 +11,9 @@ commands = coverage run --source=markdown {toxinidir}/run-tests.py {posargs} deps = flake8 commands = flake8 {toxinidir}/markdown {toxinidir}/tests {toxinidir}/setup.py {toxinidir}/run-tests.py +[testenv:checkspelling] +deps = +commands = {toxinidir}/checkspelling.sh + [flake8] max-line-length = 119
\ No newline at end of file |