Debian Codegraph @

core/docs/source/faq.rst

raw
1 FAQ / Known limitations / Known issues
2 ======================================
3
4 Known limitations
5 -----------------
6
7 There are inherent limitations to what ``rstcheck-core`` can and cannot do. The reason for this is
8 that ``rstcheck-core`` itself relies on external tools for parsing and error reporting.
9 The rst source e.g. is given to ``docutils`` which then parses it and returns the errors.
10 Therefore ``rstcheck-core`` is more like an error accumulation tool. The same goes for the source
11 code in supported code blocks.
12
13 Known issues
14 ------------
15
16 Code blocks without language (Sphinx)
17 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
19 According to the `documentation for reStructuredText`_ over at docutils the language is an optional
20 argument to a code block directive.
21 In vanilla mode language-less code blocks are treated like code blocks which specified a language
22 that is not supported by ``rstcheck``.
23
24 When sphinx support is active however, a deeply nested issue arises in form of an
25 :py:exc:`AttributeError`. This exception has the unpleasant side-effect that linting for the whole
26 file containing this language-less code block fails. This may result in a false negative for
27 the file.
28
29 **There are currently only one fix available:**
30
31 Explicitly specifying the language for the code block.
32 This renders the ``highlight`` directive useless, but is the only known way to fix this issue.
33 And it enables checks of the source code inside those code blocks, if the language is supported of
34 cause.
35
36 This issue is tracked in issue :issue:`3`.
37
38
39 .. _documentation for reStructuredText: https://docutils.sourceforge.io/docs/ref/rst/directives.html#code