sphinx-lint
sphinx-lint copied to clipboard
Configure supported directives
A brief look through the source, I saw the list of directive names is hardcoded and contains many specific to the CPython docs:
https://github.com/sphinx-contrib/sphinx-lint/blob/f6a736db170cc9b4eef14f0708c4bc01e7b81dd7/sphinxlint.py#L87-L100
Would it be an idea to limit the list to just Sphinx roles by default, and have some way of adding "known" directive names? This could be via e.g. sphinx-lint.toml or via command line flags.
An extension to this idea would be dumping custom directives from Sphinx through some mechanism, and then having some sphinx-lint init that could use that hook with a project's conf.py to auto-populate. But baby steps!
A
Turns out the second part of this is basically #1, sorry! I think the first part is still useful as a stand-alone issue.
A