Fixed setup for spelling tests to be equal in tox.ini and GHA.

* tox.ini now uses the same language (en_US) GHA already did.
* tox.ini now turns warnings into errors as GHA already did.
* Makefile: Had to remove replacement of en_US, so that language (used by GHA previously) can be used via Makefile.
* Had to add several entries to the wordlist: I do no know how this ever has worked in GHA. (I got them before locally when calling `tox -e docs`.)

Remaining difference:

* tox.ini does not use `-q` so it is still possible to see the progress.
This commit is contained in:
Michael Howitz 2022-09-25 14:33:58 +01:00
parent 0f31d10c7c
commit 73dcb927f0
4 changed files with 13 additions and 6 deletions

View File

@ -37,4 +37,6 @@ jobs:
- name: Build docs - name: Build docs
run: | run: |
cd docs cd docs
sphinx-build -b spelling -n -q -W --keep-going -d _build/doctrees -D language=en_US -j auto . _build/spelling export SPHINXOPTS="-q -W --keep-going -j auto"
export LANGUAGE=en_US
make spelling

View File

@ -14,14 +14,10 @@ ifndef LANGUAGE
override LANGUAGE = en override LANGUAGE = en
endif endif
# Convert something like "en_US" to "en", because Sphinx does not recognize
# underscores. Country codes should be passed using a dash, e.g. "pt-BR".
LANGUAGEOPT = $(firstword $(subst _, ,$(LANGUAGE)))
# Internal variables. # Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -n -d $(BUILDDIR)/doctrees -D language=$(LANGUAGEOPT) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . ALLSPHINXOPTS = -n -d $(BUILDDIR)/doctrees -D language=$(LANGUAGE) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others # the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

View File

@ -149,6 +149,7 @@ drilldown
dropdown dropdown
dropdowns dropdowns
Dunck Dunck
dz
editability editability
encodings encodings
Endian Endian
@ -250,6 +251,7 @@ Kyngesburye
Kyrgyz Kyrgyz
latin latin
lawrence lawrence
lexer
Libera Libera
lifecycle lifecycle
lifecycles lifecycles
@ -349,6 +351,7 @@ pingback
pingbacks pingbacks
Pinney Pinney
Pinterest Pinterest
pk
plaintext plaintext
pluggable pluggable
pluralizations pluralizations
@ -410,6 +413,7 @@ recomputation
recursed recursed
redeclare redeclare
redirections redirections
Redis
redisplay redisplay
redisplayed redisplayed
redisplaying redisplaying
@ -458,6 +462,7 @@ shapefiles
sharding sharding
sitewide sitewide
sliceable sliceable
Slocum
SMTP SMTP
solaris solaris
Sorani Sorani
@ -465,6 +470,7 @@ sortable
Spectre Spectre
Springmeyer Springmeyer
SSL SSL
st
stacktrace stacktrace
stateful stateful
staticfile staticfile

View File

@ -56,6 +56,9 @@ deps =
pyenchant pyenchant
sphinxcontrib-spelling sphinxcontrib-spelling
changedir = docs changedir = docs
setenv =
SPHINXOPTS=-W --keep-going -j auto
LANGUAGE=en_US
commands = commands =
make spelling make spelling