rstcheck / rstcheck-core

Core library behind rstcheck.
http://rstcheck-core.rtfd.io/
MIT License
4 stars 8 forks source link

[Feature]: Support for linting of non-standard sphinx directives with rst content #68

Open r-o-b-e-r-t-o opened 1 year ago

r-o-b-e-r-t-o commented 1 year ago

To Dos

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

Cielquan commented 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.