diff --git a/docs/how-to/source_to_doc_links.rst b/docs/how-to/source_to_doc_links.rst index f36866a3..3ed9e73b 100644 --- a/docs/how-to/source_to_doc_links.rst +++ b/docs/how-to/source_to_doc_links.rst @@ -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`. diff --git a/src/extensions/score_source_code_linker/generate_source_code_links_json.py b/src/extensions/score_source_code_linker/generate_source_code_links_json.py index abedc2db..dfe6857a 100644 --- a/src/extensions/score_source_code_linker/generate_source_code_links_json.py +++ b/src/extensions/score_source_code_linker/generate_source_code_links_json.py @@ -28,6 +28,7 @@ TAGS = [ "# " + "req-traceability:", "# " + "req-Id:", + "# " + "need-Id:", # to link from source code to architecture element ]