-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Detect invalid role targets #28
Comments
TIL it's already handled by Sphinx but not enabled by default: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-nitpicky Sadly on cpython it detects thousands of them, most are expected, like:
Many removed things in old whatsnew, and so on... I don't know if there's any value in using |
If something is already reported by Sphinx as an error/warning, should sphinx-lint still check for it? I was wondering the same thing in #27 (comment), where several cases are already caught by Sphinx. |
There's a way to choose: as sphinx-lint could be used by an IDE to highlight errors, all errors are usefull but it have to be fast and it have to be able to work on a single file. Detecting invalid targets is not fast and does not work on a single file, so I would be against implementing it in sphinx-lint, but other fast tests are OK (but not a priority) to me even if they duplicate errors already seen by Sphinx. |
Currently it's possible to refer to functions, methods, classes, etc. that don't exist, using
:func:`not_existing_function()`
. This is sometimes done intentionally, but other times the target is invalid because of a misspelling or because the package/module/class name is missing.It might be helpful to detect and report these, perhaps with
severity=0
.This came up in python/cpython#92309 (comment)
The text was updated successfully, but these errors were encountered: