doc8 icon indicating copy to clipboard operation
doc8 copied to clipboard

Error in "code-block" directive: unknown option: "linenos".

Open jobec opened this issue 4 years ago • 3 comments

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"

jobec avatar Feb 11 '20 09:02 jobec

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

jobec avatar Feb 11 '20 09:02 jobec

Also seeing this. Breaking multiple linting checks pipeline.

fmigneault avatar Jun 11 '20 15:06 fmigneault

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".

thepabloaguilar avatar Sep 19 '20 16:09 thepabloaguilar