Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/how-to/source_to_doc_links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ Reference Docs in Source Code
In your C++/Rust/Python source code, you want to reference requirements (needs).
The docs-as-code tool will create backlinks in the documentation.

Use a comment and start with ``req-Id:`` or ``req-traceability:`` followed by the need ID.
Use a comment and start with ``req-Id:``, ``req-traceability:`` or ``need-Id:`` followed by the need ID.

.. code-block:: python

# req-Id: TOOL_REQ__EXAMPLE_ID
# req-traceability: TOOL_REQ__EXAMPLE_ID
# need-Id: TOOL_REQ__EXAMPLE_ID

For an example, look at the attribute ``source_code_link``
of :need:`tool_req__docs_common_attr_title`.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
TAGS = [
"# " + "req-traceability:",
"# " + "req-Id:",
"# " + "need-Id:", # to link from source code to architecture element
]


Expand Down
Loading