Skip to content

Expand directive format validation in doc building #14177

Description

@tsbinns

A while back checks were added to the docs build procedure that malformed sphinx directives would be caught: https://github.com/mne-tools/mne-python/blob/main/doc/sphinxext/directive_formatting.py
However, the logic isn't exhaustive.

A warning directive is present in the Notes section of apply_hilbert, but it is missing a second colon:

mne-python/mne/filter.py

Lines 2747 to 2751 in 5e17532

.. warning: Do not use ``envelope=True`` if you intend to compute
an inverse solution from the raw data. If you want to
compute the envelope in source space, use
``envelope=False`` and compute the envelope after the
inverse solution has been obtained.

As such, this never appears:

Image

We should extend the logic of the checks to catch cases like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions