Skip to content

Commit 8d77504

Browse files
hoe-jocastler
authored andcommitted
[rules score] enable lobster report build without component requirements
1 parent e03f4c0 commit 8d77504

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

bazel/rules/rules_score/lobster/config/lobster_de.conf.tpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ requirements "Feature Requirements" {
33
}
44

55
requirements "Component Requirements" {
6-
{COMP_REQ_SOURCES}
7-
trace to: "Feature Requirements";
8-
}
6+
{COMP_REQ_SOURCES}{COMP_REQ_TRACE}}
97

108
activity "Unit Test" {
119
{UNIT_TEST_SOURCES}

bazel/rules/rules_score/private/dependable_element.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,14 +999,15 @@ def _dependable_element_index_impl(ctx):
999999
lobster_html_report = None
10001000
lobster_rst_dir = None
10011001
lobster_files = []
1002-
if feat_req_list and comp_req_list:
1002+
if feat_req_list:
10031003
lobster_config = ctx.actions.declare_file(ctx.label.name + "/de_traceability_config")
10041004
ctx.actions.expand_template(
10051005
template = ctx.file._lobster_de_template,
10061006
output = lobster_config,
10071007
substitutions = {
10081008
"{FEAT_REQ_SOURCES}": format_lobster_sources(feat_req_list),
10091009
"{COMP_REQ_SOURCES}": format_lobster_sources(comp_req_list),
1010+
"{COMP_REQ_TRACE}": (" trace to: \"Feature Requirements\";\n") if comp_req_list else "",
10101011
"{ARCH_SOURCES}": format_lobster_sources(comp_arch_list),
10111012
"{UNIT_TEST_SOURCES}": format_lobster_sources(comp_test_list),
10121013
"{PUBLIC_API_SOURCES}": format_lobster_sources(interface_req_list),

0 commit comments

Comments
 (0)