From 35ce530ef1f40d967164a6753c915565ac9b2126 Mon Sep 17 00:00:00 2001 From: dantleech Date: Sun, 25 Jan 2015 18:03:55 +0000 Subject: [PATCH 01/11] Added spell checker to travis - Use sphinxcontrib-spelling - Requires the enchant library (has to be installed with apt-get) --- .travis.yml | 9 +- Makefile | 5 + book/doctrine.rst | 2 +- conf.py | 8 +- index.rst | 5 - requirements.txt | 3 + spelling_word_list.txt | 441 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 464 insertions(+), 9 deletions(-) create mode 100644 requirements.txt create mode 100644 spelling_word_list.txt diff --git a/.travis.yml b/.travis.yml index 29682488140..b43a04a0690 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,10 @@ language: python python: "2.7" -sudo: false +sudo: true + +before_script: + - sudo apt-get install enchant cache: directories: @@ -11,7 +14,9 @@ cache: install: pip install sphinx~=1.3 git+https://github.com/fabpot/sphinx-php.git -script: sphinx-build -nW -b html -d _build/doctrees . _build/html +script: + - sphinx-build -nW -b html -d _build/doctrees . _build/html + - make spelling branches: except: diff --git a/Makefile b/Makefile index a37807af545..2105cbe9c99 100644 --- a/Makefile +++ b/Makefile @@ -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)/* @@ -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: + $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling + @echo "Spelling report generated in $(BUILDDIR)/spelling/output.txt" diff --git a/book/doctrine.rst b/book/doctrine.rst index 7cde77256c8..ef17f3e6229 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -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 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, diff --git a/conf.py b/conf.py index e7c6b9d1800..828857f674a 100644 --- a/conf.py +++ b/conf.py @@ -35,9 +35,15 @@ 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' + 'sphinxcontrib.spelling', ] +exclude_patterns = ['changelog.rst'] + +# Configuration for sphinxcontrib.spelling +spelling_lang='en_US' +spelling_word_list_filename='spelling_word_list.txt' + # Add any paths that contain templates here, relative to this directory. templates_path = ['_theme/_templates'] diff --git a/index.rst b/index.rst index cdfd5ff67f8..b8083efe348 100644 --- a/index.rst +++ b/index.rst @@ -3,11 +3,6 @@ Symfony Documentation ===================== -.. toctree:: - :hidden: - - changelog - Quick Tour ---------- diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000000..0b9d5f39258 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +Sphinx==1.1.3 +sphinxcontrib-spelling +pyenchant diff --git a/spelling_word_list.txt b/spelling_word_list.txt new file mode 100644 index 00000000000..c2683e6f1f3 --- /dev/null +++ b/spelling_word_list.txt @@ -0,0 +1,441 @@ +accessor +addEventSubscriber +admin +admins +Ai +Akamai +allowExtraFields +allowLandscape +allowLandscapeMessage +allowMissingFields +allowPortrait +allowPortraitMessage +allowSquare +allowSquareMessage +antiflood +apc +Apc +api +apikey +app +App +apps +architected +args +assetic +Assetic +attr +auth +authenticateToken +autocompleted +autocompletion +Autocompletion +autofill +autoload +autoloaded +autoloaders +autoloading +Autoloading +backend +Baz +bcrypt +Bcrypt +BCrypt +behaviour +Behaviour +binaryFormat +bio +birthdate +bitmask +bitmasks +Bitmasks +blog +Blog +bothIsbnMessage +bugfix +BundleName +cacheability +cacheable +callables +camelCase +Camelized +camelizes +caseSensitive +catalogue +Catalogue +catalogues +CGI +changeset +charset +Charset +charsets +checkbox +checkboxes +Checkboxes +checkHost +checkMX +chgrp +chmod +chown +cli +clickable +codebase +conf +config +Config +configurability +configurator +Configurator +createToken +cron +cronjobs +csrf +Ctrl +ctype +cURL +datapicker +datatypes +de +Debian +denormalization +denormalized +deserialize +deserialized +deserializer +deserializing +Deserializing +dev +disallowEmptyMessage +docblock +downloader +Doxygen +dropdown +Drupal +dumpFile +Eberlei +eg +enctype +enum +Enum +errorPath +esi +ETag +ETags +exactMessage +extraFieldsMessage +eZPublish +fabien +fallback +Fallback +fastcgi +fcgi +filesystem +Filesystem +filesystems +foo +Foobar +foreach +formulae +freenode +frontend +Frontend +ftp +gc +genrb +gmail +Gmail +Goutte +GPL +hardcode +Hardcode +hardcoded +hardcoding +Hardcoding +hasser +Hassers +headshot +Heroku +hinclude +Honeycrisp +hostname +html +htmlPattern +http +Http +httpd +httponly +https +hyperlinks +Iban +iconv +Icu +ide +ies +ignoreNull +ing +ini +inline +Inline +inlined +intl +Intl +intranet +invalidMessage +Ip +IPv +isAbsolutePath +isbn +Isbn +isser +Issers +Issn +jpegoptim +Jpegoptim +jQuery +js +json +Karlton +kB +KiB +kibibyte +Kudu +latin +libxml +lifecycle +Lifecycle +listbox +localhost +locator +Logplex +loopback +Luhn +makePathRelative +matchingCityAndZipCode +maxHeight +maxHeightMessage +maxlifetime +maxMessage +maxRatio +maxRatioMessage +maxSize +maxSizeMessage +maxWidth +maxWidthMessage +mbstring +mebibyte +meetup +memcache +memcached +Memcached +metadata +Metadata +MiB +microtime +mimeTypes +mimeTypesMessage +minHeight +minHeightMessage +minification +Minification +minifier +minMessage +minRatio +minRatioMessage +minWidth +minWidthMessage +missingFieldsMessage +mitre +mkdir +modelled +monolog +Monolog +mre +multipleMessage +Multiselect +namespace +Namespace +namespaced +Namespaced +namespaces +Namespaces +namespacing +nd +Nginx +notFoundMessage +notReadableMessage +npm +ยบ +OAuth +offline +ok +online +optgroup +org +overcomplicate +overriden +Overriden +PaaS +Packagist +params +performant +php +PHP +phpdoc +pid +Pid +plaintext +plugin +Plugin +plugins +Plugins +popup +postExecute +Potencier +pre +Pre +preconfigured +preExecute +prepend +prepended +Prepending +preUpdate +Procfile +programmatically +readonly +Readonly +rebase +Rebase +rebasing +refactor +Refactor +refactored +refactorization +regex +Regex +regexes +renderers +replaceXXX +repo +repositoryMethod +requireHyphen +reST +reStructuredText +reusability +revalidate +rsync +sandboxed +sandboxing +scp +screenshot +selectedchoice +sendmail +serializer +Serializer +setfacl +setXXX +sha +Silex +sizeNotDetectedMessage +Sluggable +smartphone +smtp +Sqlite +Stabilisation +stacktrace +stderr +stty +stylesheet +stylesheets +Stylesheets +subinterface +sublicense +subrequest +subroles +subtemplate +superglobal +superglobals +superinterface +supportsToken +swiftmailer +symfony +Symfony +symlink +symlinks +tagname +targetEntity +templating +Templating +textarea +textbox +throbber +timeline +timestamp +Timestampable +toctrees +todo +tokenizer +tomany +Tomayko +toolbar +Toolbar +Toolbelt +tooltip +transchoice +txt +Ubuntu +UI +umask +un +uncached +unhandled +unix +Unported +unserialize +unversioned +uploadErrorMessage +uploadFormSizeErrorMessage +uploadIniSizeErrorMessage +url +Url +urls +Urls +userland +username +Username +Uuid +vaidation +validator +Validator +validators +Validators +vcl +vendoring +versioned +versioning +Versioning +VirtualBox +vv +webmaster +webprofiler +webserver +webservice +whitelist +Wikipedia +wildcard +wildcards +Woh +workflow +Workflow +xcache +Xdebug +XDebug +xkcd +Xliff +xml +xor +xpath +XPath +xsd +yaml +Yaml +yml From 4a5ede1205083f0991f915b0e7b0155e7105e064 Mon Sep 17 00:00:00 2001 From: dantleech Date: Sun, 8 Feb 2015 08:32:40 +0000 Subject: [PATCH 02/11] Added make.bat and container travis config --- make.bat | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/make.bat b/make.bat index cfda326358d..fa5e3debf7b 100644 --- a/make.bat +++ b/make.bat @@ -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 ) @@ -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 From 55f24b295cd8c9483bcc383965cbf6057c101dee Mon Sep 17 00:00:00 2001 From: dantleech Date: Sun, 8 Feb 2015 08:38:48 +0000 Subject: [PATCH 03/11] Updated travis --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b43a04a0690..6f46a40beca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,11 @@ language: python python: "2.7" -sudo: true +sudo: false -before_script: - - sudo apt-get install enchant +addons: + apt_packages: + - enchant cache: directories: From fc06305221bb03f2b04a096b15e23f7f18b7211f Mon Sep 17 00:00:00 2001 From: dantleech Date: Sun, 8 Feb 2015 14:05:26 +0000 Subject: [PATCH 04/11] ping --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6f46a40beca..4e9cefb9075 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ sudo: false addons: apt_packages: - enchant + - time cache: directories: From 32746017c6436d9b9867a30c799b31a39aab91a2 Mon Sep 17 00:00:00 2001 From: dantleech Date: Sun, 8 Feb 2015 19:09:57 +0000 Subject: [PATCH 05/11] Pong --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4e9cefb9075..6f46a40beca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ sudo: false addons: apt_packages: - enchant - - time cache: directories: From c97a3ee33d3a44c457413c94776fb283422104c2 Mon Sep 17 00:00:00 2001 From: dantleech Date: Fri, 6 Nov 2015 08:40:44 +0100 Subject: [PATCH 06/11] Use requirements.txt --- .travis.yml | 2 +- requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6f46a40beca..035b6cef242 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ cache: - $HOME/.cache/pip - _build -install: pip install sphinx~=1.3 git+https://github.com/fabpot/sphinx-php.git +install: pip install -r requirements.txt --use-mirrors -q script: - sphinx-build -nW -b html -d _build/doctrees . _build/html diff --git a/requirements.txt b/requirements.txt index 0b9d5f39258..af79fb5554c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Sphinx==1.1.3 sphinxcontrib-spelling pyenchant +git+https://github.com/fabpot/sphinx-php.git From 82843c8a6e2473eb3ecb226ca0789a07e01fd951 Mon Sep 17 00:00:00 2001 From: dantleech Date: Fri, 6 Nov 2015 09:12:46 +0100 Subject: [PATCH 07/11] Fixed --- .travis.yml | 1 + conf.py | 18 +++++++++++------- requirements.txt | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 035b6cef242..d5907c5a5e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ install: pip install -r requirements.txt --use-mirrors -q 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 branches: except: diff --git a/conf.py b/conf.py index 828857f674a..4660adccbc2 100644 --- a/conf.py +++ b/conf.py @@ -33,17 +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', + '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', ] -exclude_patterns = ['changelog.rst'] - # 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'] @@ -79,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 diff --git a/requirements.txt b/requirements.txt index af79fb5554c..87eb4939759 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Sphinx==1.1.3 +Sphinx==1.3 sphinxcontrib-spelling pyenchant git+https://github.com/fabpot/sphinx-php.git From b5465f9b93222d46b6bc1eb184d1123d8c90eae7 Mon Sep 17 00:00:00 2001 From: dantleech Date: Fri, 6 Nov 2015 09:28:34 +0100 Subject: [PATCH 08/11] More words --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index d5907c5a5e1..791431a8a69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ sudo: false addons: apt_packages: - enchant + - ispell + - ibritish-insane cache: directories: From bb1e01916e8b04fd5f47cae14263ed3d7480f97f Mon Sep 17 00:00:00 2001 From: dantleech Date: Fri, 6 Nov 2015 09:32:07 +0100 Subject: [PATCH 09/11] Removed use-mirrors (deprecated) --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 791431a8a69..3fc3c0acf02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,14 +8,15 @@ addons: apt_packages: - enchant - ispell - - ibritish-insane + - ibritish + - iamerican cache: directories: - $HOME/.cache/pip - _build -install: pip install -r requirements.txt --use-mirrors -q +install: pip install -r requirements.txt -q script: - sphinx-build -nW -b html -d _build/doctrees . _build/html From 32ccc9967d1cd4874f1d8615e9b2cbba80941dec Mon Sep 17 00:00:00 2001 From: dantleech Date: Fri, 6 Nov 2015 09:39:02 +0100 Subject: [PATCH 10/11] Include aspell --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3fc3c0acf02..8a1d95bd1f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,8 @@ sudo: false addons: apt_packages: - enchant - - ispell - - ibritish - - iamerican + - aspell + - aspell-en cache: directories: From 2220ba2ce9d46f687bf2849a5d5370d075ba883f Mon Sep 17 00:00:00 2001 From: dantleech Date: Fri, 6 Nov 2015 09:45:07 +0100 Subject: [PATCH 11/11] Added ispell --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8a1d95bd1f4..e31bcc43075 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ addons: - enchant - aspell - aspell-en + - ispell + - iamerican cache: directories: @@ -21,6 +23,7 @@ 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: