sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

linkcheck should check URLs of raw directives

Open n-peugnet opened this issue 3 years ago • 2 comments

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.

n-peugnet avatar Aug 06 '22 17:08 n-peugnet

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.

n-peugnet avatar Aug 07 '22 07:08 n-peugnet

On second thought it could still be useful to check for redirections.

n-peugnet avatar Aug 07 '22 08:08 n-peugnet

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?

francoisfreitag avatar Aug 16 '22 13:08 francoisfreitag

Yes, I implemented (and tested) it in #10757.

n-peugnet avatar Aug 16 '22 22:08 n-peugnet