Inspectopedia 2025.2 Help

Role is not defined

Reports undefined roles in reStructuredText files.

Example:

.. role:: custom .. role:: newcustom(emphasis) An example of using :custom:`interpreted text` An example of using :newcustom:`interpreted text` An example of using :emphasis:`interpreted text` Some text using undefined role :undef:`interpreted text`

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

RestRoleInspection
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | ReST

Inspection ID: RestRoleInspection

Inspection options

Here you can find the description of settings available for the Role is not defined inspection, and the reference of their default values.

Ignored roles

Option ID:

ignoredRoles

Default value:

None

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection RestRoleInspection

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Inspection Details

By default bundled with:

DataSpell 2025.2, PyCharm 2025.2,

Can be installed with plugin:

ReStructuredText, 252.26661.0

Last modified: 18 September 2025