From 78cf0a9bc6e32439ac34b4eef432114b5e784ad8 Mon Sep 17 00:00:00 2001 From: PhilipPartsch <95444300+PhilipPartsch@users.noreply.github.com> Date: Mon, 15 Dec 2025 09:36:39 +0100 Subject: [PATCH 1/2] Add need-Id tag for linking source code to architecture / detailed design elements Signed-off-by: PhilipPartsch <95444300+PhilipPartsch@users.noreply.github.com> --- .../score_source_code_linker/generate_source_code_links_json.py | 1 + 1 file changed, 1 insertion(+) 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 ] From 6e4f428ae5a25c1653920b47f70a538542b19663 Mon Sep 17 00:00:00 2001 From: PhilipPartsch <95444300+PhilipPartsch@users.noreply.github.com> Date: Mon, 15 Dec 2025 09:41:49 +0100 Subject: [PATCH 2/2] Add 'need-Id' reference option to documentation Signed-off-by: PhilipPartsch <95444300+PhilipPartsch@users.noreply.github.com> --- docs/how-to/source_to_doc_links.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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`.