Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@ python: "2.7"

sudo: false

addons:
apt_packages:
- enchant
- aspell
- aspell-en
- ispell
- iamerican

cache:
directories:
- $HOME/.cache/pip
- _build

install: pip install sphinx~=1.3 git+https://github.com/fabpot/sphinx-php.git
install: pip install -r requirements.txt -q

script: sphinx-build -nW -b html -d _build/doctrees . _build/html
script:
- sphinx-build -nW -b html -d _build/doctrees . _build/html
- make spelling
- cat _build/spelling/output.txt | sed -e 's/.*(\(.*\))/\1/g' | sort | uniq
- cat _build/spelling/output.txt | sed -e 's/.*(\(.*\))/\1/g' | sort | uniq | wc -l

branches:
except:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ help:
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " spelling generate a spelling report"

clean:
-rm -rf $(BUILDDIR)/*
Expand Down Expand Up @@ -151,3 +152,7 @@ doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

spelling:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also add a spelling task to make.bat, to make things work on Windows too.

$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
@echo "Spelling report generated in $(BUILDDIR)/spelling/output.txt"
2 changes: 1 addition & 1 deletion book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Databases and Doctrine
======================

One of the most common and challenging tasks for any application
One of the most common deliberatemistake and challenging tasks for any application
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to demonstrate the spell checking

involves persisting and reading information to and from a database. Although
the Symfony full-stack Framework doesn't integrate any ORM by default,
the Symfony Standard Edition, which is the most widely used distribution,
Expand Down
22 changes: 16 additions & 6 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,24 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo',
'sensio.sphinx.refinclude', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode', 'sensio.sphinx.bestpractice', 'sensio.sphinx.codeblock',
'symfonycom.sphinx'
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sensio.sphinx.refinclude',
'sensio.sphinx.configurationblock',
'sensio.sphinx.phpcode',
'sensio.sphinx.bestpractice',
'sensio.sphinx.codeblock',
'sphinxcontrib.spelling',
]

# Configuration for sphinxcontrib.spelling
spelling_lang='en_US'
spelling_word_list_filename='spelling_word_list.txt'

# We exclude the changelog to prevent the spell checker checking the changelog
exclude_patterns = ['_theme', 'changelog.rst']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_theme/_templates']

Expand Down Expand Up @@ -73,9 +86,6 @@
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_theme']

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
Expand Down
5 changes: 0 additions & 5 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
Symfony Documentation
=====================

.. toctree::
:hidden:

changelog

Quick Tour
----------

Expand Down
7 changes: 7 additions & 0 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ if "%1" == "help" (
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
echo. spelling generate a spelling report
goto end
)

Expand Down Expand Up @@ -235,6 +236,12 @@ results in %BUILDDIR%/doctest/output.txt.
goto end
)

if "%1" == "spelling" (
%SPHINXBUILD% -b spelling %ALLSPHINXOPTS% %BUILDDIR%/spelling
echo.Spelling report generated in %BUILDDIR%/spelling/output.txt.
goto end
)

if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Sphinx==1.3
sphinxcontrib-spelling
pyenchant
git+https://github.com/fabpot/sphinx-php.git
Loading