User defined directives, roles, etc to ignore
See original GitHub issueI’m aware of #26 which added an example of registering a directive (which would allow full validation), but how about making it easy to ignore user defined lists of non-standard RST directives, roles, etc?
I am thinking along these lines, a recent change to my flake8-rst-docstrings
(which calls into restructuredtext-lint to get docutils to validate RST extracted from docstrings in Python code):
https://github.com/peterjc/flake8-rst-docstrings/pull/16
As an aside, are substitutions common enough to need handling too? e.g. Using this for version
seems quite common.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Unknown directive type #4 - peterjc/flake8-rst-docstrings
Hello, I'm using the sphinxcontrib-needs extension. It brings own Sphinx directives flake8-rst-docstrings does not know about.
Read more >Defining your own directives - Oracle Help Center
Defining your own directives. You can define user-defined directives using the macro directive. A macro is a template fragment associated with a variable....
Read more >Directives in Schema IDL - Lacinia - Read the Docs
Directives allow Lacinia to change the incoming query based on additional criteria. For example, we can use directives to include or skip a...
Read more >Preprocessor Directives in AL - Business Central
The different types of preprocessor directives in AL; conditional, regions, and pragmas and preprocessorSymbols setting.
Read more >Directives - Sphinx documentation
This directive must contain a reST definition-list-like markup with terms and definitions. The definitions will then be referenceable with the term role.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Someone recently drew my attention to a similar tool called
rstcheck
which also wrapsdocutils
for RST validation:https://github.com/myint/rstcheck
This offers command line settings
--ignore-directives
and--ignore-roles
as discussed here which can also be used via Python (and it has other ignore lists like substitutions).The other big feature is it can check the syntax of some code blocks within the RST (e.g. a block of JSON or XML) - indeed this was originally the only thing this tool did back at v0.1 six years ago.
Hi, I was also looking into rst-lint for similar requirements as @peterjc and it will be much appreciated.