diff --git a/src/extensions/score_metamodel/metamodel.yaml b/src/extensions/score_metamodel/metamodel.yaml index a7a28c66a..208b1a99b 100644 --- a/src/extensions/score_metamodel/metamodel.yaml +++ b/src/extensions/score_metamodel/metamodel.yaml @@ -736,6 +736,7 @@ needs_types: violates: feat_arc_sta optional_options: mitigation_issue: ^https://github.com/.*$ + safety_relevant: ^(yes|no)$ optional_links: mitigated_by: stkh_req, aou_req parts: 3 @@ -758,6 +759,7 @@ needs_types: optional_options: # req-Id: tool_req__docs_saf_attrs_mitigation_issue mitigation_issue: ^https://github.com/.*$ + safety_relevant: ^(yes|no)$ optional_links: # req-Id: tool_req__docs_saf_attrs_mitigated_by # (only mandatory once valid status == valid) @@ -782,6 +784,7 @@ needs_types: optional_options: # req-Id: tool_req__docs_saf_attrs_mitigation_issue mitigation_issue: ^https://github.com/.*$ + safety_relevant: ^(yes|no)$ mandatory_links: # req-Id: tool_req__docs_saf_attrs_violates violates: comp_arc_sta @@ -810,6 +813,8 @@ needs_types: optional_options: # req-Id: tool_req__docs_saf_attrs_mitigation_issue mitigation_issue: ^https://github.com/.*$ + safety_relevant: ^(yes|no)$ + root_cause: ^[\s\S]+$ mandatory_links: # req-Id: tool_req__docs_saf_attrs_violates violates: feat_arc_dyn @@ -837,6 +842,8 @@ needs_types: optional_options: # req-Id: tool_req__docs_saf_attrs_mitigation_issue mitigation_issue: ^https://github.com/.*$ + safety_relevant: ^(yes|no)$ + root_cause: ^[\s\S]+$ mandatory_links: # req-Id: tool_req__docs_saf_attrs_violates violates: comp_arc_dyn diff --git a/src/tests/test_consumer.py b/src/tests/test_consumer.py index ad6d53b21..cceef1117 100644 --- a/src/tests/test_consumer.py +++ b/src/tests/test_consumer.py @@ -199,7 +199,8 @@ def filter_repos(repo_filter: str | None) -> list[ConsumerRepo]: def comment_out_git_override(module_content: str) -> str: """ - Comment out existing git_override blocks for score_docs_as_code only. + Comment out existing override blocks for score_docs_as_code only. + Handles git_override, single_version_override, local_path_override, archive_override, etc. """ lines = module_content.splitlines() result = [] @@ -208,8 +209,8 @@ def comment_out_git_override(module_content: str) -> str: while i < len(lines): line = lines[i] - # Check if this line starts a git_override block - if re.match(r"^\s*git_override\s*\(", line): + # Check if this line starts any *_override block + if re.match(r"^\s*\w+_override\s*\(", line): # Collect the entire block block_start = i depth = line.count("(") - line.count(")")