Skip to content

:need: role in RST headers not detected by ubCode linter #71

@hspiertz-denso

Description

@hspiertz-denso

Describe the bug
The ubCode linter does not detect or warn when the :need: role (from sphinx-needs) is used inside RST section headers/titles. Using :need: in a header causes a Sphinx build error, but ubCode provides no diagnostic for this unsupported usage during editing.

This means the error is only discovered at build time rather than during development in the editor, defeating the purpose of the linter for this class of error.

To Reproduce
Steps to reproduce the behavior:

  1. Open a .rst file in VS Code with ubCode extension installed
  2. Add a section header that includes a :need: reference, for example:
    Requirements for :need:`REQ_001`
    =================================
  3. Save the file and observe that ubCode does not report any warning or error
  4. Run sphinx-build (or make html) and observe the build error related to the :need: role in the title

Expected behavior
ubCode should detect that :need: (and potentially other sphinx-needs roles like :need_incoming:, :need_outgoing:) are not supported inside RST section headers/titles and report a diagnostic warning or error in the editor.

Screenshots

Desktop (please complete the following information):

  • OS: Linux in Devcontainer
  • Architecture x64
  • ubCode version: 0.28.2

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions