-
Notifications
You must be signed in to change notification settings - Fork 714
Docs: make Sphinx stricter #7603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Found four variants, picked the first: 1. ``PATH`` 2. `PATH` 3. ``$PATH`` 4. :envvar:`PATH` The last (4) produced an error with sphinx: ``` doc/cabal-project.rst:644: WARNING: 'envvar' reference target not found: PATH ```
Wasn't immediate to get to the error from the warning ``` doc/cabal-project.rst:2: WARNING: Duplicate ID: "cfg-field-type". ``` (wrong line number, "cfg-field-type" is not greppable).
Strict regime: turn warnings to errors (-W), rebuild from scratch (-E).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not nearly enough experience on my part, but LGTM. Citing from IRC:
somebody asked (here? on gibhub) if we build docs as part of CI; we don't, right? should we? I guess we should, unless it takes forever?
OK, got the question and the answer, so we now need a PR: #7586 (comment) |
@Mergifyio backport 3.6 |
Command
|
I think we shouldn't have So in the makefile: SPHINX_FLAGS += -n --keep-going -E And in CI: SPHINX_FLAGS=-W make users-guide |
@fgaz wrote:
Is the Makefile shipped? I thought it is developers only.
Can I then still override the flags with |
that's right, but I still think it'd be nicer to not fail on warnings when writing docs so that one can still preview them while fixing the warnings (like for haskell). this would also avoid breakage in case new warnings are added to sphinx (though it looks like we're pinning it)
yes. from what I understand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way that above is just a weak preference so I'll just give an approve. It can also be done later when someone adds CI for the guide
If it turns out that |
Merged over the corpse of AppVeyor CI. |
Thank you! |
Command
|
Docs: make Sphinx stricter (backport #7603)
Added flags to sphinx-build to make it stricter:
-n
: more warnings-W
: warnings to errors-E
: rebuildThis will hopefully prevent errors creeping in to the docs (e.g. broken references such as #7469).
Thanks to these flags, I fixed two issues (see additional commits).