Open r-o-b-e-r-t-o opened 1 year ago
Checking instead of ignoring would indeed be a good alternative. I am open for suggestions.
It would need to be implemented in rstcheck-core
first and then need an API for usage in rstcheck
. If you want to do both PRs you may link to this issue from rstcheck
. No need to open a second issue there.
To Dos
[X] I have checked the issues and think that this is not a duplicate.
[X] I added a very descriptive title to this issue.
Description
The sphinx-needs extension allows to define new directives that support reStructuredText (rst) code in its content. Because the directives are unknown to docutils no linting is provided by rstcheck. Currently we add these unknown directives to the
ignore_directives
list in rstcheck config file.With the requested feature users would be able to add directives instead of ignoring them. Rstcheck would use docutils and sphinx API to register a generic sphinx directive that parses the rst content.
If the feature is considered to be valuable contribution to rstcheck (rstcheck core to be more precise) I could provide the corresponding code contribution suggestion.
Operating System
Linux
Operating System Details
No response
Python Version
3.8.10
rstcheck Version
rstcheck CLI Version: 6.1.0 rstcheck-core Version: 1.0.2