Skip to content
Closed
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
14 changes: 13 additions & 1 deletion docs/product/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ This section provides an overview of current process requirements and their clar
* A prefix indicating the need type (e.g. `feature__`)
* A middle part matching the hierarchical structure of the need:
* For requirements: a portion of the feature tree or a component acronym
* For architecture elements: the structural element (e.g. some part of the feature tree, component acronym)
* For architecture elements: the structural element (e.g. specific part of the feature tree, component acronym)
* Additional descriptive text to ensure human readability


Expand Down Expand Up @@ -114,6 +114,18 @@ This section provides an overview of current process requirements and their clar

Docs-as-Code shall enforce that each Need contains a description (content).


.. tool_req:: Enforces description wording rules
:id: tool_req__docs_common_attr_desc_wording
:tags: Common Attributes
:implemented: YES
Comment thread
MaximilianSoerenPollak marked this conversation as resolved.
:satisfies: PROCESS_gd_req__req__attr_desc_weak
:parent_covered: YES


Docs-as-Code shall enforce that Need description do not contain the weak words that are defined in the metamodel


----------------------------
🔒 Security Classification
----------------------------
Expand Down
9 changes: 4 additions & 5 deletions src/extensions/score_metamodel/checks/attributes_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,10 @@ def check_description(app: Sphinx, need: NeedsInfoType, log: CheckLogger):
---
"""
weak_words = app.config.weak_words
if need["type"] in [
"stkh_req",
"feat_req",
"comp_req",
] and need.get("content", None):
need_options = get_need_type(app.config.needs_types, need["type"])

tags = need_options.get("tags", [])
if "requirement_excl_process" in tags and need.get("content", None):
Comment on lines +134 to +137
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still not quiet right.
As we want the 'requirement_excl_process' to be inside the metamodel defined not here.

Basically do not want to change python code if we want to change which needs or what words are affected.

for word in weak_words:
if word in need["content"]:
msg = f"contains a weak word: `{word}`. Please revise the description."
Expand Down
9 changes: 5 additions & 4 deletions src/extensions/score_metamodel/metamodel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ needs_types_base_options:
- shall
- must
- will
# req-Id: tool_req__docs_common_attr_description
# req-Id: tool_req__docs_common_attr_desc_wording
content:
- just
- about
Expand Down Expand Up @@ -73,8 +73,6 @@ needs_types:
status: ^(valid)$
optional_links:
links: ^.*$
tags:
- requirement

std_wp:
title: Standard Work Product
Expand Down Expand Up @@ -235,6 +233,7 @@ needs_types:
hash: ^.*$
tags:
- requirement
- requirement_excl_process

# req-Id: tool_req__docs_req_types
feat_req:
Expand All @@ -261,6 +260,7 @@ needs_types:
hash: ^.*$
tags:
- requirement
- requirement_excl_process

# req-Id: tool_req__docs_req_types
comp_req:
Expand All @@ -286,6 +286,7 @@ needs_types:
hash: ^.*$
tags:
- requirement
- requirement_excl_process

# req-Id: tool_req__docs_req_types
tool_req:
Expand Down Expand Up @@ -315,6 +316,7 @@ needs_types:
parent_has_problem: ^.*$
tags:
- requirement
- requirement_excl_process

# req-Id: tool_req__docs_req_types
aou_req:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not aou? Any other missing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the list of the requirement we need to cover not all of them I didn't want the new tag name to be more longer or I can exclude aou also in the name: https://eclipse-score.github.io/docs-as-code/pr-140/product/requirements.html#tool_req__docs_req_weak_content

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did add AOU I think in my PR, as I saw it missing.
But we can double check it.

Expand All @@ -340,7 +342,6 @@ needs_types:
tags:
- requirement


# Architecture
feat_arc_sta:
title: Feature Architecture Static View
Expand Down