Skip to content

Needs list shall take into account "only" directive  #1103

Open
@David-Le-Nir

Description

@David-Le-Nir

When using the only directive some needs may require to be excluded from the needs list, i.e. from needs.json, needtable, needpie ...

For example:

.. only:: tag1

  .. req:: requirement for tag1
       :id: req-001

       This one shall only appear when building tag1

.. req:: requirement for all tags
     :id: req-002

       This one shall always appear

in this case when I don't build tag1, I don't want req-001 to appear in needs.json or in needtable

Do you agree about the expected behaviour ?
Do you know if while processing the need level we are able to know that the element is under an "only" block ?

just for information, we found this interesting extension which can be inspiring: https://github.com/pfalcon/sphinx_selective_exclude

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