sphinx
sphinx copied to clipboard
linkcheck should check URLs of raw directives
Is your feature request related to a problem? Please describe.
When using a raw directive with the url option, the linkcheck builder does not check this URL.
Describe the solution you'd like
I would expect the URLs of raw directives to be checked by linkcheck.
Sorry I just found out that Sphinx resolves raw directives while reading sources so an error will be displayed before the linkcheck builder is even used.
On second thought it could still be useful to check for redirections.
So the suggestion is that linkcheck fails if a raw directive url attribute points to a server that issues a redirect outside of https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_allowed_redirects?
Yes, I implemented (and tested) it in #10757.