docs: Do not run rstcheck on sphinx-consumed docs

Turns out that we're already running Sphinx with options that are strict
enough to perform all sorts of checks. The `rstcheck` standalone tool is
too strict, it warns about legitimate Sphinx constructs (hence the
ignore list), and also happens to issue false warnings. Let's rely on
Sphinx for stuff below docs/, but still invoke rstcheck for the
top-level README (and anything that's not included in the Sphinx docs,
really, which is right now the README, AUTHORS, and a JSON-specific doc
that I have yet to convert).

Bug: https://github.com/myint/rstcheck/issues/19
Change-Id: Ib787d11e7d21452570618288acdf15b3e85270a7
This commit is contained in:
Jan Kundrát
2020-06-17 20:28:53 +02:00
parent a98e244abd
commit 05eb312f4a
2 changed files with 4 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ script:
- python setup.py develop
- pip install pytest-cov rstcheck
- pytest --cov-report=xml --cov=gnpy -v
- rstcheck --ignore-roles cite --ignore-directives automodule --recursive --ignore-messages '(Duplicate explicit target name.*)' .
- rstcheck --ignore-roles cite *.rst
- sphinx-build -W --keep-going docs/ x-throwaway-location
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@@ -22,9 +22,11 @@ commands =
[testenv:docs]
deps =
rstcheck
whitelist_externals =
/bin/sh
commands =
sphinx-build -E -W --keep-going -q -b html docs/ doc/build/html
rstcheck --ignore-roles cite --ignore-directives automodule --recursive --ignore-messages '(Duplicate explicit target name.*)' {toxinidir}
/bin/sh -c "rstcheck --ignore-roles cite *.rst"
[testenv:linters]
commands =