question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User defined directives, roles, etc to ignore

See original GitHub issue

I’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:open
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
peterjccommented, Mar 9, 2020

Someone recently drew my attention to a similar tool called rstcheck which also wraps docutils 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.

1reaction
AyanSinhaMahapatracommented, Sep 4, 2019

I want to be able to use rst-lint as a quick check for a pre-commit hook and/or early step in continuous integration - with a dedicated continuous integration building the documentation later if that all seems fine (e.g. sphinx, which is slow).

Hi, I was also looking into rst-lint for similar requirements as @peterjc and it will be much appreciated.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found