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
run: |
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
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.
PAPEROPT_a4 = -D latex_paper_size=a4
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
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

View File

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

View File

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