Closed sils closed 8 years ago
something like lint(content, directives=('automodule', 'autoclass')
, so you have a dict somewhere associating the directive with the name? Or maybe a "sphinx mode".
Unfortunately, there is no trivial way to do this. We explored it at length in #11 and #14. The key comment is here:
https://github.com/twolfson/restructuredtext-lint/pull/14#issuecomment-91928790
The tl;dr of it is most directives require configuration which cannot be automatically be distilled.
We have added documentation for loading of non-configuration based directives in the README:
https://github.com/twolfson/restructuredtext-lint/tree/0.14.0#extension
For anything higher level, we would need to create another package which leverages restructuredtext-lint
and is aware of a Sphinx configuration.
If would be nice to have some switch so restructuredtext_lint would add directives for sphinx based documentation on its own. At least I've not yet found out how to register the automodule directive (without recreating the directive class on my own).