doc8
doc8 copied to clipboard
Error in "code-block" directive: unknown option: "linenos".
Related to #26
docs/index.rst:2: D000 Error in "code-block" directive:
unknown option: "linenos".
The same for these options:
-
linenos
-
lineno-start
-
caption
-
emphasize-lines
-
dedent
In Sphinx, this is valid, but doc8 sees it as an error.
.. code-block:: python
:linenos:
:caption: test.py
:name: test.py
:emphasize-lines: 2
def foo():
return "bar"
It's an old issue it seems.
Refs:
- https://bugs.launchpad.net/doc8/+bug/1426503
- https://github.com/openstack/openstack-manuals/blob/d93af826209e258370f6a8867b50a8cc4f136128/tox.ini#L96-L98
- https://github.com/ros2/ros2_documentation/blob/1923e244e80f0e65c099e7a7358c21036b94ee0b/.travis.yml#L11-L12
Also seeing this. Breaking multiple linting checks pipeline.
I have the same issue here 😢
Code example:
.. code:: pycon
:force:
>>> assert Failure(1).failure() == 1
>>> Success(1).failure()
Traceback (most recent call last):
...
returns.primitives.exceptions.UnwrapFailedError
doc8 output:
docs/pages/railway.rst:146: D000 Error in "code" directive:
unknown option: "force".
docs/pages/railway.rst:163: D000 Error in "code" directive:
unknown option: "force".